Dean Montevago wrote:
something like this ?

//STEP1 EXEC PROC1 //TESTCC IF (STEP1.RC <= 4) THEN //STEP2 EXEC PROC2 // ELSE //TESTEND ENDIF //ABEND EXEC PGM=ABEND,PARM='0010'

Well, maybe. I liked John McKown's suggestion
as even cleaner. Your original post said you
want to flush the job if the first proc does
not complete with condition code 0. In this
case, you do not need to code a step name:

//   IF RC = 0 THEN
//STEP2  EXEC  PROC2
//   ENDIF

does that. The reason is: if you do not
specify a stepname on your RC test, the
test is for the greatest return code from
any step run so far.

Now, if you want to add the abend program
as you just indicated above, I would code
something like this:

//   IF RC = 0 THEN
//STEP2  EXEC  PROC2
//   ELSE
//ABEND  EXEC  PGM=ABEND,PARM='0010'
//   ENDIF


<ad>
All this and more is covered in each of our
three day classes:

z/OS JCL and Utilities
see: http://www.trainersfriend.com/JCL_courses/B610descrpt.htm

Advanced Topics in z/OS JCL
see: http://www.trainersfriend.com/JCL_courses/B620descrpt.htm

</ad>

Kind regards,

-Steve Comstock

----------------------------------------------------------------------
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

Reply via email to