Hi Don, Thanks much for the response. Please find my questions below
Question 1:
For generating incident , we are using alert mechanism (Notify failure alert(Remedy) , for the autorestart setup I have created my own alert, Notify failure alert(bad). . If I place the alert (Remedy) inside the BAD Proc , MNvariables are not getting populated.
CODE:
Procedure:
Application Autorestart
Job A
RUN ANY
NOTIFY FAILURE ALERT (BAD)
ENDJOB
Procedure for Bad:
IF (%MNJOB='A' AND %MNCMPC EQ '4001') THEN DO
REXXON
TRACE N
X=TRAPOUT('STS.')
"ESPNOMSG LTJ %MNJOB I"
X=TRAPOUT('OFF')
PARSE VAR STS.3 "COMPLETED," V1 ","
PARSE VAR STS.4 "COMPLETED," V2 ","
PARSE VAR STS.5 "COMPLETED," V3 ","
PARSE VAR STS.6 "COMPLETED," V4 ","
/* PARSE VAR STS.6 "COMPLETED," V5 "," */
IF V1 = ' CC 4001' & V2 = ' CC 4001' & V3 = ' CC 4001' ,
& V4 = ' CC 4001' THEN
DO
NOTIFY FAILURE ALERT(REMEDY) ==> (Incident not getting generated due to MN variables not found)
END
ELSE DO
"ESPNOMSG AJ %MNJOB HOLD APPL(%MNAPPL..%MNAPPLGEN)"
"ESPNOMSG AJ %MNJOB RESUB APPL(%MNAPPL..%MNAPPLGEN)"
"ESPNOMSG AJ %MNJOB RESET +
DELAYSUB('REALNOW PLUS 2 MIN') +
APPL(%MNAPPL..%MNAPPLGEN)"
"ESPNOMSG AJ %MNJOB RELEASE APPL(%MNAPPL..%MNAPPLGEN)"
END
REXXOFF
EXIT
ENDDO
If job A fails with the return code 4001, it will try to auto restart 5 times, 5th time incident should be generated . but am getting the error 'Application not found' due to Monitor variables not being populated.
Please advise.
QUESTION 2:
Also Is there history field available to distinguish between autorestart and manual restart of a job. Basically Reporting mechanism to quantify the number of auto-restart job’s success and failure rate .