Our QuickRef states that the nesting level is 15.

IBM Mainframe Discussion List <[email protected]> wrote on 01/19/2011 
08:19:08 AM:

> From: Mark Pace <[email protected]>
> To: [email protected]
> Date: 01/19/2011 08:19 AM
> Subject: Re: If Else JCL question
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> 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 
<[email protected]
> > 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 *
> >
> > [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
> >
> 
> 
> 
> -- 
> 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


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 [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to