We need to have a setup in place when a Windows/Mainframe job fails it should get automatically resubmitted 5 times. If it fails for the 5th time it should send email to support team.
1st - 5th Instance of Failure --- Job should be restarted automatically
5th Instance of Failure --- Send email
Need automated resubmission of failed job.
Release : 11.4
Component : CA ESP WORKLOAD AUTOMATION
Within the scope of a job you can use IF logic that will check the Submission number(ESPAPSUB#) of a job. If the first submission is less than or equal to 5, and the job
abends/fails, it will issue a NOTIFY firing an alert call RSUB. RSUB will trigger an event ESP.ALERT12. Event will invoke a procedure to resubmit the job up to 5 times.
If the submission number is greater than 5 it will use a different NOTIFY sending an email to a MAILBOX that has been setup as USER01. You can add an Alert here if you need to invoke a procedure to open a problem ticket.
IF ESPAPSUB# LE 5 THEN DO
NOTIFY ABEND FAILURE ALERT(RSUB)
IF ESPAPSUB# GT 5 THEN DO
NOTIFY RESUB MAILBOX(USER01)
CCCHK RC(5:4095) FAIL CONTINUE
DELAYSUB 0800 EST
ALERT ID EVENT NAME
EVENT ID(ESP.ALERT12) SYSTEM(X120M) REPLACE
JOB RESUB.JOB TASK PROCESS SELFCOMPLETING
IF MNSUB# LE 5 THEN -
ESPNOMSG AJ %MNJOB RESUB APPL(%MNAPPL..%MNAPPLGEN)
MAILBOX USER01 MAXLINES(300)
EMAIL [email protected]