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

Problem in COND


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jan 05, 2009 3:36 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Reference for COND parameter. JCL & VSAM 1
No new posts Job scheduling problem. JCL & VSAM 9
Search our Forums:

Back to Top