Normally (by default), if a jobstep abends, subsequent steps are flushed. I have a requirement in a job that, if a particular step of the job abends with a particular code, then the job should continue. However, if any subsequent step abends, then further steps should be flushed. This seems unfortunately difficult to arrange. For example:
//COND1 EXEC PGM=SETCOND,PARM=0 //COND2 EXEC PGM=SETCOND,PARM=U111 // IF (COND2.RUN=TRUE OR COND2.ABENDCC=U0111) THEN //COND3 EXEC PGM=SETCOND,PARM=8 //COND4 EXEC PGM=SETCOND,PARM=U222 //COND5 EXEC PGM=SETCOND,PARM=0 //COND6 EXEC PGM=SETCOND,PARM=0 // ENDIF Step COND2 abends with U0111, then the job continues. However, then COND4 abends with U0222 ... and yet COND5 and COND6 still run. (Yes, I can see *why* ... but that's no help.) I can't find any easy way to construct the job so that an abend in COND2 will let things continue but an abend in a step after COND2 will flush the rest of the job. The best I've found so far is this, but it's pretty ugly and I don't want to use it if I can possibly help it: //COND1 EXEC PGM=SSCOND,PARM=0 //COND2 EXEC PGM=SSCOND,PARM=U111 // IF (COND2.RUN=TRUE OR COND2.ABENDCC=U0111) THEN //COND3 EXEC PGM=SSCOND,PARM=8 // IF (COND3.RUN AND COND3.ABEND=FALSE) THEN //COND4 EXEC PGM=SSCOND,PARM=U222 // ENDIF // IF (COND4.RUN AND COND4.ABEND=FALSE) THEN //COND5 EXEC PGM=SSCOND,PARM=0 // ENDIF // IF (COND5.RUN AND COND5.ABEND=FALSE) THEN //COND6 EXEC PGM=SSCOND,PARM=0 // ENDIF // ENDIF There ought to be a better way! Have I missed something obvious? Can anyone offer a suggestion? Allen Gainsford =============== Info Developer, Banking Shared Services HP Enterprise Services (South Pacific) Office +64-4-819-5236 | Fax +64-4-819-5955 | Email [email protected] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

