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

Reply via email to