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
 
Condition code checking

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

New User


Joined: 17 May 2007
Posts: 11
Location: Chennai, India

PostPosted: Tue Mar 04, 2008 2:13 am    Post subject: Condition code checking
Reply with quote

Hello All,

I want to check the condition codes in a job which is as follows.

//STEP01 EXEC PGM=AAAA,COND=(0,LT),
...............
//STEP02 EXEC PGM=IEBGENER,COND=(0,NE)
..............
//STEP03 EXEC PGM=BBBBB,COND=(0,NE)
..................
//STEP05 EXEC PGM=IDCAMS,COND=(4,LT,STEP03.G)

I want STEP05 to execute only if STEP03 ends with a return code of 4 or less. The above condition checking works fine if STEP03 runs fine.

However, when STEP03 itself is not executed because of return codes from STEP01 or STEP02, the condition code in STEP05 is not checked and STEP05 gets executed.

Can anyone suggest a way to resolve this?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 04, 2008 3:10 am    Post subject:
Reply with quote

Hello,

Add the 0,NE to the STEP05 COND=.
Back to top
View user's profile Send private message
jagadeeshkumar

New User


Joined: 17 May 2007
Posts: 11
Location: Chennai, India

PostPosted: Tue Mar 04, 2008 4:32 am    Post subject:
Reply with quote

Hi,

I changed the condition code in STEP05 as

//STEP05 EXEC PGM=IDCAMS,COND=((4,LT,STEP03),(0,NE))

Now, STEP05 is not executed. The return code of the previous steps are

STEP1 : 0
STEP2 : 0
STEP3 : 4
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 04, 2008 7:01 am    Post subject:
Reply with quote

Hello,

I believe you need to add the 0,NE for each of the 3 prior steps.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8657
Location: Back in jolly old England

PostPosted: Tue Mar 04, 2008 12:46 pm    Post subject:
Reply with quote

IF / THEN / ELSE allows you to test if a previous step has run or not, and you can then specify that if STEP03 has not processed, then do not process STEP05.
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:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting GG return code abdulrafi IMS DB/DC 2 Tue Apr 10, 2018 12:31 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts IMS error U4038 while executing my PL... abdulrafi IMS DB/DC 2 Thu Feb 08, 2018 1:05 pm
No new posts Conditional setting of return-code af... sanvan COBOL Programming 9 Wed Jan 31, 2018 11:05 pm
No new posts IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am

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