IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

USe of IF ELSE in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 04, 2012 2:44 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 04, 2012 2:45 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 04, 2012 2:52 pm
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
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B680/17.1.4?SHELF=IEA2BK91&DT=20080604022956&CASE=

and here
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Search our Forums:

Back to Top