Hi
Iliopoulos_Ioannis_6110 ,
As I'm using the same example from the documentation (BW_RESTART_CHAIN documentation), I think I can post it here:
I used this example as a start for my own script. I'll use it also here. Check it out:
- On the BW_ACTIVATE_CHAIN job post process:
!Check if the job ended_not_ok and extract the chain id
:if get_statistic_detail(, RETURN_CODE)<> 0
: SET &HND# = PREP_PROCESS_REPORT(, , PLOG, '*U2004111*',
'COL=DELIMITER', "DELIMITER=
@'@): SET &LOGID# = ''
: PROCESS &HND#
: SET &LOGID# = GET_PROCESS_LINE(&HND#, 4)
: ENDPROCESS
: IF &LOGID# <> ''
: PUT_READ_BUFFER LOGID# = &LOGID#
: PUT_READ_BUFFER CHAIN# = 'insert chain name'
: set &go=activate_uc_object(RESTART_CHAIN_JOB, wait)
: ENDIF
:endif
- On the BW_RESTART_CHAIN job:
:read &LOGID#,,,
:read &chain#,,,
BW_RESTART_CHAIN
ID='&CHAIN#',LOGID='&LOGID#',ERROR='ABEND',NOFOUND='NORMAL'
Something like this....the amount of information depends on where your
jobs is located (workflow, direct on schedule, event, etc). So, other
rules can be set in order to ease the way that the restart job is
displayed for monitoring purposes.
Hope this helps!