Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem in COND

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

New User


Joined: 29 Nov 2006
Posts: 27
Location: India

PostPosted: Mon Jan 05, 2009 3:31 pm    Post subject: Problem in COND
Reply with quote

I am facing a weird problem in a JCL using COND.
I have a JCL with three step -
Code:
//STEP01 EXEC PGM=test1
//*
//*
//STEP02 EXEC PGM=test2, COND=(0,NE,STEP01)
//*
//*
//STEP03 EXEC PGM=test3, COND=(0,NE,STEP02)
//*
//*

This is the output I got in IOF:
Code:
RC    STEP        COMMENTS
10     STEP01   
*      STEP02    NOT EXECUTED
0      STEP03   

How come STEP03 runs even if STEP02 not executed? If a STEP is not executed due to COND, what will be the return code of the step(if I use that step RC as a COND)?
Back to top
View user's profile Send private message

expat

Global Moderator


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

PostPosted: Mon Jan 05, 2009 3:36 pm    Post subject:
Reply with quote

Read the JCL reference manual - accessible by the manuals button at the top of the page to see what happens in these cases.
Back to top
View user's profile Send private message
arindam111

New User


Joined: 29 Nov 2006
Posts: 27
Location: India

PostPosted: Mon Jan 05, 2009 3:44 pm    Post subject:
Reply with quote

Ok I got it. Thanks expat for guiding me to the right path.

Ok, here what I got -

If none of the test conditions specified on the COND parameter are satisfied, the system evaluates the COND parameter as false and executes the job step.

The system performs the COND parameter tests against return codes from the current execution of the job. If a test specifies a previous step that was bypassed, the system evaluates the COND parameter as false.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Jan 05, 2009 10:01 pm    Post subject:
Reply with quote

Next time please post the JCL as executed, hiding confidential data. Your JCL as posted would get a JCL error because of the commas after the program names in steps 2 and 3. The space after the comma turns the COND parameters into comments.
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us