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:[email protected]] Namens McKown, John Verzonden: woensdag 19 januari 2011 15:14 Aan: [email protected] 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 * [email protected] * 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:[email protected]] On Behalf Of Mark Pace > Sent: Wednesday, January 19, 2011 7:58 AM > To: [email protected] > 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 [email protected] 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 [email protected] 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 [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

