I have just had a new request to automatically include a procedure which will do recovery of the system before a job is rerun when it abends. We do not use datastore and TWS auto-recovery is switched off.
Can someone advise how I could possibily modify the JCL when the job abends so that the additional procedure is inserted very easily. I see that their are no predefined variable which could be used to dynamically change the JCL based on settings.



I would like to know a JCL that checks for an empty file and throws a non zero return code in batch.
Do not want to use FILEAID as we dont have this given software license.
Regards
Nandan
//**********************************************
//* STEP RETURNS RC=4, IF FILE IS EMPTY
//*********************************************
//STEP010 EXEC PGM=IDCAMS
//IN DD DSN=DATASET.EMPTY.CHECK,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DATA
PRINT INFILE(IN) COUNT(1)
/*