Re: JCL COND= processing
Now for the first step, 1 LT 0 is false, so the step runs (wonderfulness of COND, eh?). Now if the first step produces RC of 1, the next step should run (1 LT 1 is false, so step runs) but if the first step produces RC 1, then step 2 should not run (1 LT 2 is true, so step will not run). So for step 1 producing RC of 1, I would expect subsequent steps to run; but if any step produces RC 1, then remaining steps should flush. Not that this would be of great help at the moment but... I just tried the sample job/procs from your initial post and, surprise, surprise, it is working as expected for me (z/OS 1.6). I.e. jobstep-3-procstep-2 -3 are flushed when jobstep-3-procstep-1 returns RC 1 (but they run as expected when RC = 1). Can you post (or send me off-list, if you want) a joblog (with MSGLEVEL=(1,1))? My mail address is built after firstname.lastname at ch.ibm.com Peter Hunkeler Senior IT Specialist, IBM zSeries Technical Sales Support, Switzerland -- 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
Re: JCL COND= processing
-Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Chase, John Sent: Thursday, June 09, 2005 10:18 AM To: IBM-MAIN@BAMA.UA.EDU Subject: JCL COND= processing 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 RC0? 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. -- John McKown Senior Systems Programmer UICI Insurance Center Information Technology This message (including any attachments) contains confidential information intended for a specific individual and purpose, and its' content is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this transmission, or taking any action based on it, is strictly prohibited. -- 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
Re: JCL COND= processing
I may be correct, but Jay Maynard was much more succinct in his description. ;) -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of john gilmore Sent: Thursday, June 09, 2005 11:44 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: JCL COND= processing John McKown and Gary Green are of course quite correct in their 'conjectures'. You can cirecumvent this and similar problems by using nested [JCL] IF statements. John Gilmore Ashland, MA 01721 U.S.A. _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -- 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 -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.6.6 - Release Date: 6/8/2005 -- 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
Re: JCL COND= processing
-Original Message- From: IBM Mainframe Discussion List On Behalf Of Steve Comstock [ snip ] When you specify a parameter on the EXEC statement that invokes a proc, and do not specify a stepname, which is what you have above, the parameter applies to all steps (except for the PARM parameter, which doesn't apply here). So for PROC3 the COND parameter is effectively COND=(1,LT) on each step. Agreed. Now for the first step, 1 LT 0 is false, so the step runs (wonderfulness of COND, eh?). Now if the first step produces RC of 1, the next step should run (1 LT 1 is false, so step runs) but if the first step produces RC 1, then step 2 should not run (1 LT 2 is true, so step will not run). So for step 1 producing RC of 1, I would expect subsequent steps to run; but if any step produces RC 1, then remaining steps should flush. Also agreed, but they don't. Interestingly, the programmer changed the COND on the 3rd JOBstep to (0,LT), and now the remaining procsteps flush when procstep 1 issues RC1. Splain dat. :-) -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
Re: JCL COND= processing
-Original Message- From: IBM Mainframe Discussion List On Behalf Of john gilmore John McKown and Gary Green are of course quite correct in their 'conjectures'. You can cirecumvent this and similar problems by using nested [JCL] IF statements. If only we could (Standards) -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