View previous topic :: View next topic
|
Author |
Message |
arindam111
New User
Joined: 29 Nov 2006 Posts: 27 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
arindam111
New User
Joined: 29 Nov 2006 Posts: 27 Location: India
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
|