For this example it is assumed the user wishes to resubmit Job A when it fails on a return code of 4 in step STEP02
- Update Job Tracking Definition Table (JTDT) so that Job A is tracked under its own model:
TRACKDEF JOB NAME(A) MODEL(TEST)
- Create the tracking model:
DEFTM TEST STEPFAILEVENT(CYBPROD.RESUB)
- Create the event CYBPROD.RESUB
EVENT ID(CYBNR01.RESUB) SYSTEM(ESP) REPLACE INVOKE 'CYBPROD.PROCLIB(RESUB)' ENDDEF
- Create the procedure CYBPROD.PROCLIB(RESUB)
TIME='REALNOW PLUS 5 MINUTES'IF %MNSTEP='STEP02' AND %MNMXRC='4' AND %MNRRJOB EQ '' THEN DOESPNOMSG AJ %MNJOB HOLD APPL(%MNAPPL..%MNAPPLGEN)ESPNOMSG AJ %MNJOB RESUBMIT APPL(%MNAPPL..%MNAPPLGEN)ESPNOMSG AJ %MNJOB RESET DELAYSUB('%TIME') APPL(%MNAPPL..%MNAPPLGEN)ESPNOMSG AJ %MNJOB RELEASE APPL(%MNAPPL..%MNAPPLGEN)ENDDOIf the monitored job (A) gets a return code of 4 in step STEP02 and the job is not a rerun then the job will be held, resubmitted, have a delaysub of five minutes added to it and then will be released.
This Frequently Asked Question applies to all supported releases of ESP Workload Manager beginning with 5.