> -----Original Message----- > From: IBM Mainframe Discussion List On Behalf Of McKown, John > > > -----Original Message----- > > From: IBM Mainframe Discussion List On Behalf Of Chase, John > > > > Hi, All, > > > > Got a little puzzle here we can't seem to figure out. A batch job > > consists of three jobsteps, each of which invokes a multi-step PROC. > > Example: > > > > //JOBNAME JOB ... > > //STEP01 EXEC PROC1 > > //STEP02 EXEC PROC2,COND=(0,LT) > > //STEP03 EXEC PROC3,COND=(1,LT) > > > > Each PROC is structured the same, with the same COND on each procstep: > > > > //PROCn PROC > > //PSTEP1 EXEC PGM=PROGn1,COND=(0,LT) > > //PSTEP2 EXEC PGM=PROGn2,COND=(0,LT) > > //PSTEP3 EXEC PGM=PROGn3,COND=(0,LT) > > //.... > > > > Jobsteps 1 and 2 complete with RC=0, as does each procstep in > > PROC1 and > > PROC2. > > > > Jobstep 3, procstep 1 completes with RC=1 or higher, and the > > programmer expects the remainder of the job to be flushed; but all > > remaining procsteps are executed. The job finally abends S0C7 in a > > later procstep because a dataset that was intended to be populated in > > the first procstep is either empty or non-existent. > > > > The puzzle: Why is the remainder of PROC3 executed when its first > > procstep produces RC>0? > > > > TIA, > > From the JCL reference manual: > > <quote> > The COND parameter on an EXEC statement that calls a > cataloged or in-stream procedure (a calling EXEC statement) > either overrides or is added to the called EXEC statements. > </quote> > > The COND=(1,LT) on the third EXEC PROC= means that every step > in that proc has its COND __replaced__ with COND=(1,LT). I > interpret "either overrides or is added to" as meaning: > "either overrides any existing COND parameter on the EXEC or > is added to the EXEC if it does not have a COND parameter".
Saw that, but it doesn't answer the question why remaining procsteps are executed when procstep 1 produces RC=4, e.g. Even with "replacement", the "updated" statements //PSTEP2 EXEC PGM=PROGn2,COND=(1,LT) et seq. should not run if the previous step ended with RC>1, but they do. -jc- ---------------------------------------------------------------------- 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