Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
USe of IF ELSE in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Jan 04, 2012 2:39 pm    Post subject: USe of IF ELSE in JCL
Reply with quote

Hi,
Is it possible to use operator like OR and AND in IF statement in JCL.
I would like to check IF (ABEND or STEP1.RUN > 0 ) than perfrom the step.
Also is it possibel to include IF in ELSE part.


Regards,
Krunal Bafna
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Jan 04, 2012 2:44 pm    Post subject: Reply to: USe of IF ELSE in JCL
Reply with quote

If you click the IBM Manuals link at the top of the page and pick a JCL reference, you'll see what is and is not possible.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Wed Jan 04, 2012 2:45 pm    Post subject: Reply to: USe of IF ELSE in JCL
Reply with quote

what is that You did not understand when reading the JCL Reference ?
Your concerns are very well taken care of there/here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B680/17.0?SHELF=IEA2BK91&DT=20080604022956
not the last one but more than enough for a good read!
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed Jan 04, 2012 2:48 pm    Post subject:
Reply with quote

Thanks Enrico.
I have already gone through the reference document.
As a curiosity and to make some enhancement I thought It may be very helpful if we have opretors being used.

Anyways thanks.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Wed Jan 04, 2012 2:52 pm    Post subject: Reply to: USe of IF ELSE in JCL
Reply with quote

Quote:
I have already gone through the reference document.

looks like not, I just went thru it again,
and cannot do anything but confirm that the concerns You expressed are well dealt with
even with simple examples

what is that was not clear here
Quote:
You can nest IF/THEN/ELSE/ENDIF statement constructs up to a maximum of 15 levels. The steps that execute in a THEN clause and an ELSE clause can be another IF/THEN/ELSE/ENDIF statement construct.


and here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B680/17.1.4?SHELF=IEA2BK91&DT=20080604022956&CASE=

and here
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B680/17.1.4.1?SHELF=IEA2BK91&DT=20080604022956
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:


Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us