Re: If Else JCL question
Sorry for the delayed response... Yes, it is permissible to omit the continuation mark. From the z/OS V1R10.0 MVS JCL Reference manual section 17.1.4: Continuing a Relational Expression You can continue relational-expressions on the next JCL statement. Break the relational-expression where a blank is valid on the current statement, and continue the expression beginning in column 4 through 16 of the next statement. Do not put comments on the statement that you are continuing. You can code comments after you have completed the statement. For example: //TESTCON IF (RC = 8 | RC = 10 | RC = 12 | //RC = 14) THEN COMMENTS OK HERE Note the lack of continuation character. On Fri, 21 Jan 2011 09:22:06 -0600, Paul Gilmartin paulgboul...@aim.com wrote: On Fri, 21 Jan 2011 08:08:32 -0600, Robert Birdsall wrote: Similar to Gil's reply - skip if you've had enough... ... // IF (STEPA.RC = 4 AND STEPB.RC = 0 AND STEPC.RUN = FALSE AND // STEPD.RC = 8 AND STEPE.RUN = FALSE) OR ... Is it permissible to omit the continuation mark in col. 72 as you appear to have done? I thought that was permitted only if the continued line ended with a comma. (I looked briefly, not thoroughly, for this in the IF...ELSE chapter of the JCL RM.) Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). Still waiting for a followup in COND format from the person who posed the challenge... -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Paul Gilmartin wrote: On Fri, 21 Jan 2011 02:01:45 +, CM Poncelet ponce...@bcs.org.uk wrote: Any boolean tests can be performed with 'COND=', but not so with 'IF ELSE etc.' We have already discussed this in the past. Sorry; I missed that. Actually, I did not realise 'IF ELSE ...' now supports boolean testing (if it does, that is). As far as I know, it didn't in the past - but, then again, I never use it anyway. But please show me how 'IF ELSE ...' handles the following: Execute STEPF if - STEPA sets CC=04, STEPB sets CC=00, STEPC did not execute, STEPD sets CC=08 and STEPE did not execute or if - STEPA sets CC=00, STEPB did not execute, STEPC sets CC=04, STEPD did not execute and STEPE sets CC=00 or if - STEPA did not execute, STEPB sets CC=00, STEPC sets CC=04, STEPD sets CC=08 and STEPE sets either CC=04 or CC=08 otherwise do not execute STEPF. OK: // //IFELSEJOB 505303JOB,'Paul Gilmartin', // MSGLEVEL=(1,1),REGION=0M //* //USERCOUTPUT JESDS=ALL,DEFAULT=YES, // CLASS=R,PAGEDEF=V0648Z,CHARS=GT12 //* //STEPA EXEC PGM=IEFBR14 //STEPB EXEC PGM=IEFBR14 //STEPC EXEC PGM=IEFBR14 //STEPD EXEC PGM=IEFBR14 //STEPE EXEC PGM=IEFBR14 //TEST IF ( STEPA.RC=04 STEPB.RC=00x // STEPC.RUN=FALSE STEPD.RC=08 STEPE.RUN=FALSE ) | x // ( STEPA.RC=00 STEPB.RUN=FALSEx // STEPC.RC=04 STEPD.RUN=FALSE STEPE.RC=00 ) | x // ( STEPA.RUN=FALSE STEPB.RC=00x // STEPC.RC=04 STEPD.RC=08x // ( STEPE.RC=04 | STEPE.RC=08 ) ) THEN //STEPF EXEC PGM=IEFBR14 //TEST ENDIF // :w ! submit Tested; STEPA through STEPE execute; STEPF is skipped because of condiional expression. I didn't check with truth table. Also typos possible. Now, kindly reciprocate and show me how this is coded with the COND parameter on the EXEC statement, please, Case #1: //STEPA EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD * SET MAXCC EQ 4 //STEPB EXEC PGM=IEFBR14 //STEPC EXEC PGM=IEFBR14,COND=(0,LE) //STEPD EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD * SET MAXCC EQ 8 //STEPE EXEC PGM=IEFBR14,COND=(0,LE) //* //* THE FOLLOWING ARE THE SAME IN ALL CASES: //* //EX01 EXEC PGM=IEFBR14, //COND=((04,NE,STEPA),(00,NE,STEPB),(00,LE,STEPC), //(08,NE,STEPD),(00,LE,STEPE)) //EX02 EXEC PGM=IEFBR14, //COND=((00,NE,STEPA),(00,LE,STEPB),(04,NE,STEPC), //(00,LE,STEPD),(00,NE,STEPE)) //OX03 EXEC PGM=IEFBR14, //COND=((04,EQ,STEPE),(08,EQ,STEPE)) //EX03 EXEC PGM=IEFBR14, //COND=((00,LE,STEPA),(00,NE,STEPB),(04,NE,STEPC), //(08,NE,STEPD),(00,LE,OX03)) //NX04 EXEC PGM=IEFBR14, //COND=((00,LE,EX01),(00,LE,EX02),(00,LE,EX03)) //* //STEPF EXEC PGM=IEFBR14,COND=(00,LE,NX04) Case #2: //STEPA EXEC PGM=IEFBR14 //STEPB EXEC PGM=IEFBR14,COND=(0,LE) //STEPC EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD * SET MAXCC EQ 4 //STEPD EXEC PGM=IEFBR14,COND=(0,LE) //STEPE EXEC PGM=IEFBR14 //* //* THE FOLLOWING ARE THE SAME IN ALL CASES: //* //EX01 EXEC PGM=IEFBR14, //COND=((04,NE,STEPA),(00,NE,STEPB),(00,LE,STEPC), //(08,NE,STEPD),(00,LE,STEPE)) //EX02 EXEC PGM=IEFBR14, //COND=((00,NE,STEPA),(00,LE,STEPB),(04,NE,STEPC), //(00,LE,STEPD),(00,NE,STEPE)) //OX03 EXEC PGM=IEFBR14, //COND=((04,EQ,STEPE),(08,EQ,STEPE)) //EX03 EXEC PGM=IEFBR14,
Re: If Else JCL question
Paul Gilmartin wrote: On Fri, 21 Jan 2011 02:01:45 +, CM Poncelet ponce...@bcs.org.uk wrote: Any boolean tests can be performed with 'COND=', but not so with 'IF ELSE etc.' We have already discussed this in the past. Sorry; I missed that. But please show me how 'IF ELSE ...' handles the following: Execute STEPF if - STEPA sets CC=04, STEPB sets CC=00, STEPC did not execute, STEPD sets CC=08 and STEPE did not execute or if - STEPA sets CC=00, STEPB did not execute, STEPC sets CC=04, STEPD did not execute and STEPE sets CC=00 or if - STEPA did not execute, STEPB sets CC=00, STEPC sets CC=04, STEPD sets CC=08 and STEPE sets either CC=04 or CC=08 otherwise do not execute STEPF. OK: // //IFELSEJOB 505303JOB,'Paul Gilmartin', // MSGLEVEL=(1,1),REGION=0M //* //USERCOUTPUT JESDS=ALL,DEFAULT=YES, // CLASS=R,PAGEDEF=V0648Z,CHARS=GT12 //* //STEPA EXEC PGM=IEFBR14 //STEPB EXEC PGM=IEFBR14 //STEPC EXEC PGM=IEFBR14 //STEPD EXEC PGM=IEFBR14 //STEPE EXEC PGM=IEFBR14 //TEST IF ( STEPA.RC=04 STEPB.RC=00x // STEPC.RUN=FALSE STEPD.RC=08 STEPE.RUN=FALSE ) | x // ( STEPA.RC=00 STEPB.RUN=FALSEx // STEPC.RC=04 STEPD.RUN=FALSE STEPE.RC=00 ) | x // ( STEPA.RUN=FALSE STEPB.RC=00x // STEPC.RC=04 STEPD.RC=08x // ( STEPE.RC=04 | STEPE.RC=08 ) ) THEN //STEPF EXEC PGM=IEFBR14 //TEST ENDIF // :w ! submit Tested; STEPA through STEPE execute; STEPF is skipped because of condiional expression. I didn't check with truth table. Also typos possible. Now, kindly reciprocate and show me how this is coded with the COND parameter on the EXEC statement, please, Here it is again, hopefully more legible ... Case #1: //STEPA EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD * SET MAXCC EQ 4 //STEPB EXEC PGM=IEFBR14 //STEPC EXEC PGM=IEFBR14,COND=(0,LE) //STEPD EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD * SET MAXCC EQ 8 //STEPE EXEC PGM=IEFBR14,COND=(0,LE) //* //EX01 EXEC PGM=IEFBR14, //COND=((04,NE,STEPA),(00,NE,STEPB),(00,LE,STEPC), //(08,NE,STEPD),(00,LE,STEPE)) //EX02 EXEC PGM=IEFBR14, //COND=((00,NE,STEPA),(00,LE,STEPB),(04,NE,STEPC), //(00,LE,STEPD),(00,NE,STEPE)) //OX03 EXEC PGM=IEFBR14, //COND=((04,EQ,STEPE),(08,EQ,STEPE)) //EX03 EXEC PGM=IEFBR14, //COND=((00,LE,STEPA),(00,NE,STEPB),(04,NE,STEPC), //(08,NE,STEPD),(00,LE,OX03)) //NX04 EXEC PGM=IEFBR14, //COND=((00,LE,EX01),(00,LE,EX02),(00,LE,EX03)) //* //STEPF EXEC PGM=IEFBR14,COND=(00,LE,NX04) Case #2: //STEPA EXEC PGM=IEFBR14 //STEPB EXEC PGM=IEFBR14,COND=(0,LE) //STEPC EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSINDD * SET MAXCC EQ 4 //STEPD EXEC PGM=IEFBR14,COND=(0,LE) //STEPE EXEC PGM=IEFBR14 //* //EX01 EXEC PGM=IEFBR14, //COND=((04,NE,STEPA),(00,NE,STEPB),(00,LE,STEPC), //(08,NE,STEPD),(00,LE,STEPE)) //EX02 EXEC PGM=IEFBR14, //COND=((00,NE,STEPA),(00,LE,STEPB),(04,NE,STEPC), //(00,LE,STEPD),(00,NE,STEPE)) //OX03 EXEC PGM=IEFBR14, //COND=((04,EQ,STEPE),(08,EQ,STEPE)) //EX03 EXEC PGM=IEFBR14, //COND=((00,LE,STEPA),(00,NE,STEPB),(04,NE,STEPC), //(08,NE,STEPD),(00,LE,OX03)) //NX04 EXEC PGM=IEFBR14, //
Re: If Else JCL question
-Original Message- From: IBM Mainframe Discussion List On Behalf Of Frank Swarbrick [ snip ] But what COND says is execute if 4 is less than the return code. [ snip ] Almost: Execute UNLESS 4 is less than the return code. -jc- -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Thu, 20 Jan 2011 15:11:40 -0800, Edward Jaffe edja...@phoenixsoftware.com wrote: On 1/19/2011 10:11 AM, Donald Johnson wrote: We used to use a program called KABOOM, which did not exist (as I suspect with BLOWUP). One JCL statement, and a very prominent S806 abend. We use: //ABEND806 EXEC PGM=ABEND806 This program does exactly what its name implies. ;-) -- I've also used PGM=EXPCT806 -- Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS mailto:mzel...@flash.net Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html Systems Programming expert at http://expertanswercenter.techtarget.com/ -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Similar to Gil's reply - skip if you've had enough... I did test the following for all 4 execute STEPF conditions and some do not execute STEPF conditions. It works correctly as far as I can tell. Change the MAXCC=0 or the ',COND=ONLY' as required to test any condition you want. //JOBNAME JOB (whatever),'BSquare',CLASS=X,MSGCLASS=X,NOTIFY=SYSUID //* //STEPAEXEC PGM=IDCAMS,COND=ONLY //SYSPRINT DD DUMMY //SYSIN DD * SET MAXCC=0 //STEPBEXEC PGM=IDCAMS,COND=ONLY //SYSPRINT DD DUMMY //SYSIN DD * SET MAXCC=0 //STEPCEXEC PGM=IDCAMS,COND=ONLY //SYSPRINT DD DUMMY //SYSIN DD * SET MAXCC=0 //STEPDEXEC PGM=IDCAMS,COND=ONLY //SYSPRINT DD DUMMY //SYSIN DD * SET MAXCC=0 //STEPEEXEC PGM=IDCAMS,COND=ONLY //SYSPRINT DD DUMMY //SYSIN DD * SET MAXCC=0 // IF (STEPA.RC = 4 AND STEPB.RC = 0 AND STEPC.RUN = FALSE AND // STEPD.RC = 8 AND STEPE.RUN = FALSE) OR //(STEPA.RC = 0 AND STEPB.RUN = FALSE AND STEPC.RC = 4 AND // STEPD.RUN = FALSE AND STEPE.RC = 0) OR //(STEPA.RUN= FALSE AND STEPB.RC = 0 AND STEPC.RC = 4 AND // STEPD.RC = 8 AND (STEPE.RC = 4 OR STEPE.RC = 8)) THEN //STEPFEXEC PGM=IEFBR14 // ENDIF //STEPGEXEC PGM=IEFBR14 On Fri, 21 Jan 2011 02:01:45 +, CM Poncelet ponce...@bcs.org.uk wrote: Any boolean tests can be performed with 'COND=', but not so with 'IF ELSE etc.' We have already discussed this in the past. But please show me how 'IF ELSE ...' handles the following: Execute STEPF if - STEPA sets CC=04, STEPB sets CC=00, STEPC did not execute, STEPD sets CC=08 and STEPE did not execute or if - STEPA sets CC=00, STEPB did not execute, STEPC sets CC=04, STEPD did not execute and STEPE sets CC=00 or if - STEPA did not execute, STEPB sets CC=00, STEPC sets CC=04, STEPD sets CC=08 and STEPE sets either CC=04 or CC=08 otherwise do not execute STEPF. 'IF ELSE ...' is to 'COND=' as 'mouse' is to 'keyboard'. Cheers, Chris Poncelet -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Fri, 21 Jan 2011 08:08:32 -0600, Robert Birdsall wrote: Similar to Gil's reply - skip if you've had enough... ... // IF (STEPA.RC = 4 AND STEPB.RC = 0 AND STEPC.RUN = FALSE AND // STEPD.RC = 8 AND STEPE.RUN = FALSE) OR ... Is it permissible to omit the continuation mark in col. 72 as you appear to have done? I thought that was permitted only if the continued line ended with a comma. (I looked briefly, not thoroughly, for this in the IF...ELSE chapter of the JCL RM.) Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). Still waiting for a followup in COND format from the person who posed the challenge... -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). I've had terrible experiences using COND=ONLY and, to a lesser extent, COND=EVEN. Always considered them the lazy way to handle exceptions (just my opinion though) so I've avoided them if at all possible. Stan Stan Weyman Senior Software Engineer stan.wey...@emc.com EMC² (508)249-3966 where information lives It is wise to keep in mind that neither success nor failure is ever final... -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin Sent: Friday, January 21, 2011 10:22 AM To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Fri, 21 Jan 2011 08:08:32 -0600, Robert Birdsall wrote: Similar to Gil's reply - skip if you've had enough... ... // IF (STEPA.RC = 4 AND STEPB.RC = 0 AND STEPC.RUN = FALSE AND // STEPD.RC = 8 AND STEPE.RUN = FALSE) OR ... Is it permissible to omit the continuation mark in col. 72 as you appear to have done? I thought that was permitted only if the continued line ended with a comma. (I looked briefly, not thoroughly, for this in the IF...ELSE chapter of the JCL RM.) Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). Still waiting for a followup in COND format from the person who posed the challenge... -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
COND=EVEN and COND=ONLY only take effect when there is a system or user abend returned, they have nothing to do with cond code checking. If either failed to perform according to specs, I'd be raising cain with my sysprogs in short order. hernandez --- On Fri, 1/21/11, Stan Weyman stan.wey...@emc.com wrote: From: Stan Weyman stan.wey...@emc.com Subject: Re: If Else JCL question To: IBM-MAIN@bama.ua.edu Date: Friday, January 21, 2011, 10:34 AM Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). I've had terrible experiences using COND=ONLY and, to a lesser extent, COND=EVEN. Always considered them the lazy way to handle exceptions (just my opinion though) so I've avoided them if at all possible. Stan Stan Weyman Senior Software Engineer stan.wey...@emc.com EMC² (508)249-3966 where information lives It is wise to keep in mind that neither success nor failure is ever final... -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin Sent: Friday, January 21, 2011 10:22 AM To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Fri, 21 Jan 2011 08:08:32 -0600, Robert Birdsall wrote: Similar to Gil's reply - skip if you've had enough... ... // IF (STEPA.RC = 4 AND STEPB.RC = 0 AND STEPC.RUN = FALSE AND // STEPD.RC = 8 AND STEPE.RUN = FALSE) OR ... Is it permissible to omit the continuation mark in col. 72 as you appear to have done? I thought that was permitted only if the continued line ended with a comma. (I looked briefly, not thoroughly, for this in the IF...ELSE chapter of the JCL RM.) Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). Still waiting for a followup in COND format from the person who posed the challenge... -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
right you are about the COND EVEN and ONLY use. I was thinking of another issue when I inserted the 'lazy' comment. I've always considered the inverse nature of COND checking to be a problem (if this condition is met, bypass this step I think is the name of the game - I don't write much JCL anymore). If a job with multiple steps got complex enough to require the use of both COND EVEN/ONLY and the standard COND=(x,op) checks, then I would seriously look to splitting this piece of work into multiple jobs. IMHO of course. Thanks for the correction Cris. regards Stan Weyman Senior Software Engineer stan.wey...@emc.com EMC² (508)249-3966 where information lives It is wise to keep in mind that neither success nor failure is ever final... -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Cris Hernandez #9 Sent: Friday, January 21, 2011 4:38 PM To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question COND=EVEN and COND=ONLY only take effect when there is a system or user abend returned, they have nothing to do with cond code checking. If either failed to perform according to specs, I'd be raising cain with my sysprogs in short order. hernandez --- On Fri, 1/21/11, Stan Weyman stan.wey...@emc.com wrote: From: Stan Weyman stan.wey...@emc.com Subject: Re: If Else JCL question To: IBM-MAIN@bama.ua.edu Date: Friday, January 21, 2011, 10:34 AM Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). I've had terrible experiences using COND=ONLY and, to a lesser extent, COND=EVEN. Always considered them the lazy way to handle exceptions (just my opinion though) so I've avoided them if at all possible. Stan Stan Weyman Senior Software Engineer stan.wey...@emc.com EMC² (508)249-3966 where information lives It is wise to keep in mind that neither success nor failure is ever final... -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin Sent: Friday, January 21, 2011 10:22 AM To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Fri, 21 Jan 2011 08:08:32 -0600, Robert Birdsall wrote: Similar to Gil's reply - skip if you've had enough... ... // IF (STEPA.RC = 4 AND STEPB.RC = 0 AND STEPC.RUN = FALSE AND // STEPD.RC = 8 AND STEPE.RUN = FALSE) OR ... Is it permissible to omit the continuation mark in col. 72 as you appear to have done? I thought that was permitted only if the continued line ended with a comma. (I looked briefly, not thoroughly, for this in the IF...ELSE chapter of the JCL RM.) Beware of COND=ONLY to suppress execution. Decades ago, a colleague did that, but a prior step ABENDed. Embarrassing because it was my program. I've since used COND=(0,LE). Still waiting for a followup in COND format from the person who posed the challenge... -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
-Original Message- From: IBM Mainframe Discussion List On Behalf Of Gainsford, Allen the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. Heh. I learned that one as If true, don't do. Works out the same, and is catchy enough for me to remember it... Given the statement EXEC PGM=IEFBR14,COND=(4,LT), I was taught to read it: Execute program IEFBR14 unless 4 is less than the current condition code. -jc- -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
LOL. I've been writing JCL for 25 years and I still cannot get the COND right. From: IBM Mainframe Discussion List [IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin [paulgboul...@aim.com] Sent: 20 January 2011 02:45 To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Wed, 19 Jan 2011 13:13:03 -0800, Cris Hernandez #9 wrote: suppose I'm old school, never saw a need to code IF-THEN-ELSE in JCL, only use cond code checking and never have any issues with step execution or job flow. the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. I guess IBM added all that IF-THEN-ELSE stuff because too many coders never learned that lesson. http://db.cs.berkeley.edu/postgres.html -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
One thing I've been taught since I was in school 30+ years ago. Do not use NOT logic. COND goes against everything I've worked at my entire career. On Thu, Jan 20, 2011 at 2:07 PM, Lindy Mayfield lindy.mayfi...@ssf.sas.comwrote: LOL. I've been writing JCL for 25 years and I still cannot get the COND right. From: IBM Mainframe Discussion List [IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin [paulgboul...@aim.com] Sent: 20 January 2011 02:45 To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Wed, 19 Jan 2011 13:13:03 -0800, Cris Hernandez #9 wrote: suppose I'm old school, never saw a need to code IF-THEN-ELSE in JCL, only use cond code checking and never have any issues with step execution or job flow. the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. I guess IBM added all that IF-THEN-ELSE stuff because too many coders never learned that lesson. http://db.cs.berkeley.edu/postgres.html -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
One thing I've been taught since I was in school 30+ years ago. Do not use NOT logic. COND goes against everything I've worked at my entire career. I started as a JCL jockey (Prod Support/Job Scheduling) in 1981, and I believe the 'NOT Logic' is why a lot of people have problems. I used to keep a photocopy of a table, from the JCL Reference, that had entries of what normal humans wanted mapped to COND equivalents, because I still have problems, after 30 years of working with JCL. I don't know if that table still exists. - Ted MacNEIL eamacn...@yahoo.ca -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
But one of the most useful purposes of COND= testing is COND=(0,LE,whatever) ... which ensures the current jobstep will NOT execute unless previous jobstep whatever did NOT execute. So 'NOT logic' can still do what 'IF ELSE etc.' cannot. g CP Mark Pace wrote: One thing I've been taught since I was in school 30+ years ago. Do not use NOT logic. COND goes against everything I've worked at my entire career. On Thu, Jan 20, 2011 at 2:07 PM, Lindy Mayfield lindy.mayfi...@ssf.sas.comwrote: LOL. I've been writing JCL for 25 years and I still cannot get the COND right. From: IBM Mainframe Discussion List [IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin [paulgboul...@aim.com] Sent: 20 January 2011 02:45 To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Wed, 19 Jan 2011 13:13:03 -0800, Cris Hernandez #9 wrote: suppose I'm old school, never saw a need to code IF-THEN-ELSE in JCL, only use cond code checking and never have any issues with step execution or job flow. the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. I guess IBM added all that IF-THEN-ELSE stuff because too many coders never learned that lesson. http://db.cs.berkeley.edu/postgres.html -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Thu, 20 Jan 2011 14:22:36 -0500, Mark Pace wrote: One thing I've been taught since I was in school 30+ years ago. Do not use NOT logic. COND goes against everything I've worked at my entire career. Assemblerthink. Or maybe BASICthink. The IF ... GOTO ... paradigm tersified and carried to an illogical extreme. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Thu, 20 Jan 2011 20:04:08 +, CM Poncelet wrote: But one of the most useful purposes of COND= testing is COND=(0,LE,whatever) ... which ensures the current jobstep will NOT execute unless previous jobstep whatever did NOT execute. So 'NOT logic' can still do what 'IF ELSE etc.' cannot. g CP What am I missing? From: Title: z/OS V1R12.0 MVS JCL Reference Document Number: SA22-7597-14 17.1.4.5 Relational-Expression Keywords ... ^stepname.RUN stepname.RUN=FALSE Indicates that the relational expression tests that a specific job step (stepname) did not start execution. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
It's not only not logic, but is also what I would call inverse conditional. Ideally there would be an option to say execute if the return code is equal to zero or execute if the return code is less than 5. Even some not logic would be OK (IMO) if we could say execute if the return code is NOT greater than 4. In fact, I would rather prefer this. But what COND says is execute if 4 is less than the return code. Or something like that! To me it's doubly confusing. So confusing that I can't even figure out the rest of what I was going to say about it! :-) I think whoever came up with the way COND works must be an alien from an alternate (bizarro!) universe. Where was blue kryptonite when we needed it! Frank -- Frank Swarbrick Applications Architect - Mainframe Applications Development FirstBank Data Corporation - Lakewood, CO USA P: 303-235-1403 On 1/20/2011 at 12:22 PM, in message aanlktin6bacetogkmnh3csee2a_8f4bbvexjtttys...@mail.gmail.com, Mark Pace pacemainl...@gmail.com wrote: One thing I've been taught since I was in school 30+ years ago. Do not use NOT logic. COND goes against everything I've worked at my entire career. On Thu, Jan 20, 2011 at 2:07 PM, Lindy Mayfield lindy.mayfi...@ssf.sas.comwrote: LOL. I've been writing JCL for 25 years and I still cannot get the COND right. From: IBM Mainframe Discussion List [IBM-MAIN@bama.ua.edu] On Behalf Of Paul Gilmartin [paulgboul...@aim.com] Sent: 20 January 2011 02:45 To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question On Wed, 19 Jan 2011 13:13:03 -0800, Cris Hernandez #9 wrote: suppose I'm old school, never saw a need to code IF-THEN-ELSE in JCL, only use cond code checking and never have any issues with step execution or job flow. the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. I guess IBM added all that IF-THEN-ELSE stuff because too many coders never learned that lesson. http://db.cs.berkeley.edu/postgres.html -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html The information contained in this electronic communication and any document attached hereto or transmitted herewith is confidential and intended for the exclusive use of the individual or entity named above. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any examination, use, dissemination, distribution or copying of this communication or any part thereof is strictly prohibited. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this communication. Thank you. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
I wasn't looking for a lesson. Thank you very little. On Thu, Jan 20, 2011 at 3:57 PM, john gilmore john_w_gilm...@msn.comwrote: I was looking this morning at data on non-multiple and multiple human births in which live births were classified as single(si), double(do), triple(tr), quadruple (qa), or quintuple (qi). Now if one were interested only in single births it would be folly to write ¬do ¬tr ¬qa ¬qi instead of writing just si If, on the other hand, one were interested in all multiple births it would also be folly to write do | tr | qa | qi instead of writing just ¬si because someone had taught you that negative logic was 'bad'. NOT logic may be awkward, or again it may be felicitous. What is always and everywhere inexcusable is the replacement of thinking with slogans. ROT is an apposite acronym for rule of thumb. The mentors who retailed these dubious notions would have done better to teach fewer|none of them and more substantive logic. John Gilmore Ashland, MA 01721-1817 USA -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Where was blue kryptonite when we needed it! Somebody save me! C'mon! - Ted MacNEIL eamacn...@yahoo.ca -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Either I'm confused too, or COND says do NOT execute if 4 is less than the return code; that is - COND=(4,LT). Unless you meant something else... Greg Shirey Ben E. Keith Company -Original Message- From: IBM Mainframe Discussion List On Behalf Of Frank Swarbrick Sent: Thursday, January 20, 2011 2:42 PM It's not only not logic, but is also what I would call inverse conditional. Ideally there would be an option to say execute if the return code is equal to zero or execute if the return code is less than 5. Even some not logic would be OK (IMO) if we could say execute if the return code is NOT greater than 4. In fact, I would rather prefer this. But what COND says is execute if 4 is less than the return code. Or something like that! To me it's doubly confusing. So confusing that I can't even figure out the rest of what I was going to say about it! :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Gotta do this: %$%$#@$CONDCODES //STEP EXEC PGM=IEFBR14,COND=(9,LT) SAYS RUN IEFBR14 UNLESS 9 IS LESS THAN THE CURRENT MAXIMUM RETURN CODE. IF IT'S TRUE, DON'T DO... %$%$#@$CONDCODES John Donnelly National Semiconductor Corporation 2900 Semiconductor Drive Santa Clara, CA 95051 408-721-5640 408-470-8364 Cell cjp...@nsc.com -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Greg Shirey Sent: Thursday, January 20, 2011 2:01 PM To: IBM-MAIN@bama.ua.edu Subject: Re: If Else JCL question Either I'm confused too, or COND says do NOT execute if 4 is less than the return code; that is - COND=(4,LT). Unless you meant something else... Greg Shirey Ben E. Keith Company -Original Message- From: IBM Mainframe Discussion List On Behalf Of Frank Swarbrick Sent: Thursday, January 20, 2011 2:42 PM It's not only not logic, but is also what I would call inverse conditional. Ideally there would be an option to say execute if the return code is equal to zero or execute if the return code is less than 5. Even some not logic would be OK (IMO) if we could say execute if the return code is NOT greater than 4. In fact, I would rather prefer this. But what COND says is execute if 4 is less than the return code. Or something like that! To me it's doubly confusing. So confusing that I can't even figure out the rest of what I was going to say about it! :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On 1/19/2011 10:11 AM, Donald Johnson wrote: We used to use a program called KABOOM, which did not exist (as I suspect with BLOWUP). One JCL statement, and a very prominent S806 abend. We use: //ABEND806 EXEC PGM=ABEND806 This program does exactly what its name implies. ;-) -- Edward E Jaffe Phoenix Software International, Inc 831 Parkview Drive North El Segundo, CA 90245 310-338-0400 x318 edja...@phoenixsoftware.com http://www.phoenixsoftware.com/ -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
We use EXEC PGM=IEFBR15, but the funny thing was when I used EXEC PGM=KABOOM or something like that (because obviously it doesn't matter what you use as long as the program doesn't exist), some incident manager informed me that the standard to force an S806 abend was to use program IEFBR15 and that I should not start using my own programs :-) Regards, Erik. Van: IBM Mainframe Discussion List [IBM-MAIN@bama.ua.edu] namens Edward Jaffe [edja...@phoenixsoftware.com] Verzonden: vrijdag 21 januari 2011 0:11 Aan: IBM-MAIN@bama.ua.edu Onderwerp: Re: If Else JCL question On 1/19/2011 10:11 AM, Donald Johnson wrote: We used to use a program called KABOOM, which did not exist (as I suspect with BLOWUP). One JCL statement, and a very prominent S806 abend. We use: //ABEND806 EXEC PGM=ABEND806 This program does exactly what its name implies. ;-) -- Edward E Jaffe Phoenix Software International, Inc 831 Parkview Drive North El Segundo, CA 90245 310-338-0400 x318 edja...@phoenixsoftware.com http://www.phoenixsoftware.com/ -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them. - -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Honestly, I no longer know. I just know it's confusing as heck, and I have yet to see a defense of it. (Well, John Gilmore seemed to think it was understandable, if not perhaps defensible). On 1/20/2011 at 3:00 PM, in message f5ff22ced304764eaac97a43706235b7174c143...@corpexmbx.bekco.com, Greg Shirey wgshi...@benekeith.com wrote: Either I'm confused too, or COND says do NOT execute if 4 is less than the return code; that is - COND=(4,LT). Unless you meant something else... Greg Shirey Ben E. Keith Company -Original Message- From: IBM Mainframe Discussion List On Behalf Of Frank Swarbrick Sent: Thursday, January 20, 2011 2:42 PM It's not only not logic, but is also what I would call inverse conditional. Ideally there would be an option to say execute if the return code is equal to zero or execute if the return code is less than 5. Even some not logic would be OK (IMO) if we could say execute if the return code is NOT greater than 4. In fact, I would rather prefer this. But what COND says is execute if 4 is less than the return code. Or something like that! To me it's doubly confusing. So confusing that I can't even figure out the rest of what I was going to say about it! :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html The information contained in this electronic communication and any document attached hereto or transmitted herewith is confidential and intended for the exclusive use of the individual or entity named above. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any examination, use, dissemination, distribution or copying of this communication or any part thereof is strictly prohibited. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this communication. Thank you. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
I usually keep an IEFBR15 laying around for test purposes. And like Eds', this does as advertised. Best to keep such away from your incident manager ;-) Shane ... On Fri, Jan 21st, 2011 at 10:47 AM, Erik Janssen wrote: We use EXEC PGM=IEFBR15, but the funny thing was when I used EXEC PGM=KABOOM or something like that (because obviously it doesn't matter what you use as long as the program doesn't exist), some incident manager informed me that the standard to force an S806 abend was to use program IEFBR15 and that I should not start using my own programs :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Shane, Have you been hiding that IEFBR15 from me? I was using IFEBR14. As we know DNA stands for National Dyslexic Association...:) Wayne On Fri, Jan 21, 2011 at 11:16 AM, Shane Ginnane ibm-m...@tpg.com.au wrote: I usually keep an IEFBR15 laying around for test purposes. And like Eds', this does as advertised. Best to keep such away from your incident manager ;-) Shane ... On Fri, Jan 21st, 2011 at 10:47 AM, Erik Janssen wrote: We use EXEC PGM=IEFBR15, but the funny thing was when I used EXEC PGM=KABOOM or something like that (because obviously it doesn't matter what you use as long as the program doesn't exist), some incident manager informed me that the standard to force an S806 abend was to use program IEFBR15 and that I should not start using my own programs :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Wayne V. Bickerdike -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Fri, 21 Jan 2011 11:16:46 +1100, Shane Ginnane wrote: I usually keep an IEFBR15 laying around for test purposes. And like Eds', this does as advertised. Best to keep such away from your incident manager ;-) By as advertised, do we mean: IEFBR15 CSECT BR15 END Just curious. I can envision some tests for which it would be useful. I like ABEND806. Until some novice tries to generalize: //STEP EXEC PGM=ABEND213 ... and complains that it still ABENDs with 806, not 213. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
By as advertised, do we mean: IEFBR15 CSECT BR15 END we do. I like ABEND806. Until some novice tries to generalize: //STEP EXEC PGM=ABEND213 ... and complains that it still ABENDs with 806, not 213. ROTF - hadn't thought of that. You must deal with more novices than me. Shane ... -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Any boolean tests can be performed with 'COND=', but not so with 'IF ELSE etc.' We have already discussed this in the past. But please show me how 'IF ELSE ...' handles the following: Execute STEPF if - STEPA sets CC=04, STEPB sets CC=00, STEPC did not execute, STEPD sets CC=08 and STEPE did not execute or if - STEPA sets CC=00, STEPB did not execute, STEPC sets CC=04, STEPD did not execute and STEPE sets CC=00 or if - STEPA did not execute, STEPB sets CC=00, STEPC sets CC=04, STEPD sets CC=08 and STEPE sets either CC=04 or CC=08 otherwise do not execute STEPF. 'IF ELSE ...' is to 'COND=' as 'mouse' is to 'keyboard'. Cheers, Chris Poncelet Paul Gilmartin wrote: On Thu, 20 Jan 2011 20:04:08 +, CM Poncelet wrote: But one of the most useful purposes of COND= testing is COND=(0,LE,whatever) ... which ensures the current jobstep will NOT execute unless previous jobstep whatever did NOT execute. So 'NOT logic' can still do what 'IF ELSE etc.' cannot. g CP What am I missing? From: Title: z/OS V1R12.0 MVS JCL Reference Document Number: SA22-7597-14 17.1.4.5 Relational-Expression Keywords ... ^stepname.RUN stepname.RUN=FALSE Indicates that the relational expression tests that a specific job step (stepname) did not start execution. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Erik Janssen wrote: We use EXEC PGM=IEFBR15, but the funny thing was when I used EXEC PGM=KABOOM or something like that (because obviously it doesn't matter what you use as long as the program doesn't exist), some incident manager informed me that the standard to force an S806 abend was to use program IEFBR15 and that I should not start using my own programs :-) snip A Long Time Ago, In A...well, you get the idea...there was an IBM recommendation from ITSO or WSC (I don't recall which) to run one IEFBR15 per CP in a unique reporting performance group (RPGN), and subtract the time spent in that RPGN from 100% to find true CPU busy on systems that might have low utilization effects. A later dispatcher update made this unnecessary, but there might still be copies of that program lying around here and there with that name. BR15 is, of course, a very efficient loop. It's probably worth a quick check on your system to make sure it's not there, just in case, in these days of VWLC. Just a thought. -- John Eells z/OS Technical Marketing IBM Poughkeepsie ee...@us.ibm.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
subtract the time spent in that RPGN from 100% to find true CPU busy on systems that might have low utilization effects. Except for the fact that software measurements suffer from the fact that not all CPU consumed is capured. - Ted MacNEIL eamacn...@yahoo.ca -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On 20 January 2011 21:31, John Eells ee...@us.ibm.com wrote: Erik Janssen wrote: We use EXEC PGM=IEFBR15, but the funny thing was when I used EXEC PGM=KABOOM or something like that (because obviously it doesn't matter what you use as long as the program doesn't exist), some incident manager informed me that the standard to force an S806 abend was to use program IEFBR15 and that I should not start using my own programs :-) snip A Long Time Ago, In A...well, you get the idea...there was an IBM recommendation from ITSO or WSC (I don't recall which) to run one IEFBR15 per CP in a unique reporting performance group (RPGN), and subtract the time spent in that RPGN from 100% to find true CPU busy on systems that might have low utilization effects. A later dispatcher update made this unnecessary, but there might still be copies of that program lying around here and there with that name. BR15 is, of course, a very efficient loop. It's probably worth a quick check on your system to make sure it's not there, just in case, in these days of VWLC. Just a thought. At all the places I've worked, IEFBR15 caused either an S322 or an S222 abend, depending on how on-the-ball the operators were. So it's not entirely wrong to say that IEFBR15 may cause an abend, but it can be an expensive way of doing it. Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Fri, 21 Jan 2011 02:01:45 +, CM Poncelet ponce...@bcs.org.uk wrote: Any boolean tests can be performed with 'COND=', but not so with 'IF ELSE etc.' We have already discussed this in the past. Sorry; I missed that. But please show me how 'IF ELSE ...' handles the following: Execute STEPF if - STEPA sets CC=04, STEPB sets CC=00, STEPC did not execute, STEPD sets CC=08 and STEPE did not execute or if - STEPA sets CC=00, STEPB did not execute, STEPC sets CC=04, STEPD did not execute and STEPE sets CC=00 or if - STEPA did not execute, STEPB sets CC=00, STEPC sets CC=04, STEPD sets CC=08 and STEPE sets either CC=04 or CC=08 otherwise do not execute STEPF. OK: // //IFELSEJOB 505303JOB,'Paul Gilmartin', // MSGLEVEL=(1,1),REGION=0M //* //USERCOUTPUT JESDS=ALL,DEFAULT=YES, // CLASS=R,PAGEDEF=V0648Z,CHARS=GT12 //* //STEPA EXEC PGM=IEFBR14 //STEPB EXEC PGM=IEFBR14 //STEPC EXEC PGM=IEFBR14 //STEPD EXEC PGM=IEFBR14 //STEPE EXEC PGM=IEFBR14 //TEST IF ( STEPA.RC=04 STEPB.RC=00x // STEPC.RUN=FALSE STEPD.RC=08 STEPE.RUN=FALSE ) | x // ( STEPA.RC=00 STEPB.RUN=FALSEx // STEPC.RC=04 STEPD.RUN=FALSE STEPE.RC=00 ) | x // ( STEPA.RUN=FALSE STEPB.RC=00x // STEPC.RC=04 STEPD.RC=08x // ( STEPE.RC=04 | STEPE.RC=08 ) ) THEN //STEPF EXEC PGM=IEFBR14 //TEST ENDIF // :w ! submit Tested; STEPA through STEPE execute; STEPF is skipped because of condiional expression. I didn't check with truth table. Also typos possible. Now, kindly reciprocate and show me how this is coded with the COND parameter on the EXEC statement, please, 'IF ELSE ...' is to 'COND=' as 'mouse' is to 'keyboard'. I fail to see the analogy. Thanks, gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
I like using COND= on the JOB card. Suppose each step must end with an RC LE 0. //MYJOB JOB COND=(4,LE) This flushes the remaining steps in a job after the step which gets an RC greater than 4. Of course, you can't have a different RC for flushing based on the individual steps. That requires nesting the IF //STEP1 EXEC PGM= // IF (STEP1.RC LE 4) THEN //STEP2 EXEC PGM= // IF (STEP2.RC LE 8) THEN //STEP3 EXEC PGM= // IF (STEP3.RC EQ 0) THEN //STEP4 EXEC PGM= // ENDIF // ENDIF // ENDIF John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Mark Pace Sent: Wednesday, January 19, 2011 7:58 AM To: IBM-MAIN@bama.ua.edu Subject: If Else JCL question Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Thanks, John. I couldn't tell from the quick reference I was reading if you could nest the IF statements. Fortunately this series of steps should all end with RC=0. On Wed, Jan 19, 2011 at 9:13 AM, McKown, John john.mck...@healthmarkets.com wrote: I like using COND= on the JOB card. Suppose each step must end with an RC LE 0. //MYJOB JOB COND=(4,LE) This flushes the remaining steps in a job after the step which gets an RC greater than 4. Of course, you can't have a different RC for flushing based on the individual steps. That requires nesting the IF //STEP1 EXEC PGM= // IF (STEP1.RC LE 4) THEN //STEP2 EXEC PGM= // IF (STEP2.RC LE 8) THEN //STEP3 EXEC PGM= // IF (STEP3.RC EQ 0) THEN //STEP4 EXEC PGM= // ENDIF // ENDIF // ENDIF John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Mark Pace Sent: Wednesday, January 19, 2011 7:58 AM To: IBM-MAIN@bama.ua.edu Subject: If Else JCL question Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
We force an ABEND by calling a program that always ABENDs //STEP1 ... //IF (STEP1.RC EQ 0) then //STEP2 ... //ELSE //SAEXEC PGM=BLOWUP //ENDIF . IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu wrote on 01/19/2011 07:57:49 AM: From: Mark Pace pacemainl...@gmail.com To: IBM-MAIN@bama.ua.edu Date: 01/19/2011 07:58 AM Subject: If Else JCL question Sent by: IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html This e-mail message and all attachments transmitted with it may contain legally privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message and all copies and backups thereof. Thank you. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Our QuickRef states that the nesting level is 15. IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu wrote on 01/19/2011 08:19:08 AM: From: Mark Pace pacemainl...@gmail.com To: IBM-MAIN@bama.ua.edu Date: 01/19/2011 08:19 AM Subject: Re: If Else JCL question Sent by: IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu Thanks, John. I couldn't tell from the quick reference I was reading if you could nest the IF statements. Fortunately this series of steps should all end with RC=0. On Wed, Jan 19, 2011 at 9:13 AM, McKown, John john.mck...@healthmarkets.com wrote: I like using COND= on the JOB card. Suppose each step must end with an RC LE 0. //MYJOB JOB COND=(4,LE) This flushes the remaining steps in a job after the step which gets an RC greater than 4. Of course, you can't have a different RC for flushing based on the individual steps. That requires nesting the IF //STEP1 EXEC PGM= // IF (STEP1.RC LE 4) THEN //STEP2 EXEC PGM= // IF (STEP2.RC LE 8) THEN //STEP3 EXEC PGM= // IF (STEP3.RC EQ 0) THEN //STEP4 EXEC PGM= // ENDIF // ENDIF // ENDIF John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Mark Pace Sent: Wednesday, January 19, 2011 7:58 AM To: IBM-MAIN@bama.ua.edu Subject: If Else JCL question Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html This e-mail message and all attachments transmitted with it may contain legally privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message and all copies and backups thereof. Thank you. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
Actually, JOB COND=(4,LE) will flush all steps after RC greater than or equal to 4. JOB COND=(4,LT) will flush all steps after RC greater that 4... Personally, even though I still use COND= myself I *should* start using IF/THEN since I can never figure out the COND= logic without running some test job to see if what I though that would happen actually does... Regards, Erik. -Oorspronkelijk bericht- Van: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] Namens McKown, John Verzonden: woensdag 19 januari 2011 15:14 Aan: IBM-MAIN@bama.ua.edu Onderwerp: Re: If Else JCL question I like using COND= on the JOB card. Suppose each step must end with an RC LE 0. //MYJOB JOB COND=(4,LE) This flushes the remaining steps in a job after the step which gets an RC greater than 4. Of course, you can't have a different RC for flushing based on the individual steps. That requires nesting the IF //STEP1 EXEC PGM= // IF (STEP1.RC LE 4) THEN //STEP2 EXEC PGM= // IF (STEP2.RC LE 8) THEN //STEP3 EXEC PGM= // IF (STEP3.RC EQ 0) THEN //STEP4 EXEC PGM= // ENDIF // ENDIF // ENDIF John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Mark Pace Sent: Wednesday, January 19, 2011 7:58 AM To: IBM-MAIN@bama.ua.edu Subject: If Else JCL question Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them. - -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On 1/19/2011 9:09 AM, Erik Janssen wrote: Actually, JOB COND=(4,LE) will flush all steps after RC greater than or equal to 4. JOB COND=(4,LT) will flush all steps after RC greater that 4... Personally, even though I still use COND= myself I *should* start using IF/THEN since I can never figure out the COND= logic without running some test job to see if what I though that would happen actually does... Regards, Erik. Ahem http://www.trainersfriend.com/JCL_courses/B620descrpt.htm maybe in conjunction with http://www.trainersfriend.com/TSO_Clist_REXX_Dialog_Mgr/a634descrpt.htm makes for a nice 5-day package. Reinforce / remember all those tricks you knew but maybe have forgotten, plus learn new features that you may not have had time to pay attention to. /Ahem :-) -Oorspronkelijk bericht- Van: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] Namens McKown, John Verzonden: woensdag 19 januari 2011 15:14 Aan: IBM-MAIN@bama.ua.edu Onderwerp: Re: If Else JCL question I like using COND= on the JOB card. Suppose each step must end with an RC LE 0. //MYJOB JOB COND=(4,LE) This flushes the remaining steps in a job after the step which gets an RC greater than 4. Of course, you can't have a different RC for flushing based on the individual steps. That requires nesting the IF //STEP1 EXEC PGM= // IF (STEP1.RC LE 4) THEN //STEP2 EXEC PGM= // IF (STEP2.RC LE 8) THEN //STEP3 EXEC PGM= // IF (STEP3.RC EQ 0) THEN //STEP4 EXEC PGM= // ENDIF // ENDIF // ENDIF John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Mark Pace Sent: Wednesday, January 19, 2011 7:58 AM To: IBM-MAIN@bama.ua.edu Subject: If Else JCL question Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com * To get a good Return on your Investment, first make an investment! + Training your people is an excellent investment * Try our new tool for calculating your Return On Investment for training dollars at http://www.trainersfriend.com/ROI/roi.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Wed, 19 Jan 2011 09:50:56 -0600, Jonathan Goossen wrote: We force an ABEND by calling a program that always ABENDs //STEP1 ... //IF (STEP1.RC EQ 0) then //STEP2 ... //ELSE //SAEXEC PGM=BLOWUP //ENDIF Do you really _want_ the ABEND? If not, why not move the ELSE and ENDIF to the end of the JCL? BTW, What's an easy way to force an ABEND (without a program specifically for the purpose)? The most concise way that comes to mind is: //STEP EXEC PGM=IEBGENER //SYSUT1DD PATH='/',RECFM=FB,LRECL=80 ... ... gives a nice IEC143I 213-F8. But it requires three additional DD statements. Is there a shorter way? I know I can use a trivial IDCAMS step to set RC. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
We used to use a program called KABOOM, which did not exist (as I suspect with BLOWUP). One JCL statement, and a very prominent S806 abend. *don* On Wed, Jan 19, 2011 at 1:07 PM, Paul Gilmartin paulgboul...@aim.comwrote: On Wed, 19 Jan 2011 09:50:56 -0600, Jonathan Goossen wrote: We force an ABEND by calling a program that always ABENDs //STEP1 ... //IF (STEP1.RC EQ 0) then //STEP2 ... //ELSE //SAEXEC PGM=BLOWUP //ENDIF Do you really _want_ the ABEND? If not, why not move the ELSE and ENDIF to the end of the JCL? BTW, What's an easy way to force an ABEND (without a program specifically for the purpose)? The most concise way that comes to mind is: //STEP EXEC PGM=IEBGENER //SYSUT1DD PATH='/',RECFM=FB,LRECL=80 ... ... gives a nice IEC143I 213-F8. But it requires three additional DD statements. Is there a shorter way? I know I can use a trivial IDCAMS step to set RC. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Wed, 19 Jan 2011 13:11:26 -0500, Donald Johnson wrote: We used to use a program called KABOOM, which did not exist (as I suspect with BLOWUP). One JCL statement, and a very prominent S806 abend. *don* Why do I do things the hard way!? I never considered that. //STEP EXEC PGM=IEBGENER //SYSUT1DD PATH='/',RECFM=FB,LRECL=80 Well, I scrambled to contrive a method which had no dependency on any data set's content. If someone were, unbeknownst to you, to make KABOOM an alias of IEFBR14 ... Yah, I know; vanishingly improbable. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
We force the abend to stop running the job immediately. This flags that something is wrong and needs to be looked at. In the original post, Mark wanted to ABEND or GOTO EOJ or somehow end this thing If you don't want to abend the job but just conditionally run one or more steps, then I use IF-THEN-ENDIF with no else. I have written programs that set the return code to 1, 2, or 3 to indicate to the JCL future steps to run. Then anything 4+ will raise an error. IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu wrote on 01/19/2011 12:07:36 PM: From: Paul Gilmartin paulgboul...@aim.com To: IBM-MAIN@bama.ua.edu Date: 01/19/2011 12:08 PM Subject: Re: If Else JCL question Sent by: IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu On Wed, 19 Jan 2011 09:50:56 -0600, Jonathan Goossen wrote: We force an ABEND by calling a program that always ABENDs //STEP1 ... //IF (STEP1.RC EQ 0) then //STEP2 ... //ELSE //SAEXEC PGM=BLOWUP //ENDIF Do you really _want_ the ABEND? If not, why not move the ELSE and ENDIF to the end of the JCL? BTW, What's an easy way to force an ABEND (without a program specifically for the purpose)? The most concise way that comes to mind is: //STEP EXEC PGM=IEBGENER //SYSUT1DD PATH='/',RECFM=FB,LRECL=80 ... ... gives a nice IEC143I 213-F8. But it requires three additional DD statements. Is there a shorter way? I know I can use a trivial IDCAMS step to set RC. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html This e-mail message and all attachments transmitted with it may contain legally privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message and all copies and backups thereof. Thank you. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
suppose I'm old school, never saw a need to code IF-THEN-ELSE in JCL, only use cond code checking and never have any issues with step execution or job flow. the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. I guess IBM added all that IF-THEN-ELSE stuff because too many coders never learned that lesson. hernandez --- On Wed, 1/19/11, Erik Janssen erik.jans...@ing.nl wrote: From: Erik Janssen erik.jans...@ing.nl Subject: Re: If Else JCL question To: IBM-MAIN@bama.ua.edu Date: Wednesday, January 19, 2011, 11:09 AM Actually, JOB COND=(4,LE) will flush all steps after RC greater than or equal to 4. JOB COND=(4,LT) will flush all steps after RC greater that 4... Personally, even though I still use COND= myself I *should* start using IF/THEN since I can never figure out the COND= logic without running some test job to see if what I though that would happen actually does... Regards, Erik. -Oorspronkelijk bericht- Van: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] Namens McKown, John Verzonden: woensdag 19 januari 2011 15:14 Aan: IBM-MAIN@bama.ua.edu Onderwerp: Re: If Else JCL question I like using COND= on the JOB card. Suppose each step must end with an RC LE 0. //MYJOB JOB COND=(4,LE) This flushes the remaining steps in a job after the step which gets an RC greater than 4. Of course, you can't have a different RC for flushing based on the individual steps. That requires nesting the IF //STEP1 EXEC PGM= // IF (STEP1.RC LE 4) THEN //STEP2 EXEC PGM= // IF (STEP2.RC LE 8) THEN //STEP3 EXEC PGM= // IF (STEP3.RC EQ 0) THEN //STEP4 EXEC PGM= // ENDIF // ENDIF // ENDIF John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Mark Pace Sent: Wednesday, January 19, 2011 7:58 AM To: IBM-MAIN@bama.ua.edu Subject: If Else JCL question Seems to be a very rookie question, but I can't find the answer. I have a series of JCLs that I want to put together as 1 JCL with IF THEN to test RC. What I can't find is a way to stop the JCL if a step has a bad RC. ie: STEP1 IF (STEP1.RC EQ 0) then STEP2 ELSE ABEND or GOTO EOJ or somehow end this thing ENDIF IF (STEP2.RC etc, etc) VSE has labels so I can use a GOTO, but I see nothing like that in z/OS JCL. -- Mark D Pace Senior Systems Engineer Mainline Information Systems -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html - ATTENTION: The information in this electronic mail message is private and confidential, and only intended for the addressee. Should you receive this message by mistake, you are hereby notified that any disclosure, reproduction, distribution or use of this message is strictly prohibited. Please inform the sender by reply transmission and delete the message without copying or opening it. Messages and attachments are scanned for all viruses known. If this message contains password-protected attachments, the files have NOT been scanned for viruses by the ING mail domain. Always scan attachments before opening them. - -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. Heh. I learned that one as If true, don't do. Works out the same, and is catchy enough for me to remember it... Allen Gainsford === Info Developer, Banking Shared Services HP Enterprise Services (South Pacific) Office +64-4-474-5133 | Fax +64-4-474-5258 | Email a...@hp.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: If Else JCL question
On Wed, 19 Jan 2011 13:13:03 -0800, Cris Hernandez #9 wrote: suppose I'm old school, never saw a need to code IF-THEN-ELSE in JCL, only use cond code checking and never have any issues with step execution or job flow. the only cond code testing I ever do when writing procs is, if it's true, it's through, meaning the step/job won't execute if the COND is true. I guess IBM added all that IF-THEN-ELSE stuff because too many coders never learned that lesson. http://db.cs.berkeley.edu/postgres.html -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html