View previous topic :: View next topic
|
Author |
Message |
jagadeeshkumar
New User
Joined: 17 May 2007 Posts: 11 Location: Chennai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Add the 0,NE to the STEP05 COND=. |
|
Back to top |
|
|
jagadeeshkumar
New User
Joined: 17 May 2007 Posts: 11 Location: Chennai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe you need to add the 0,NE for each of the 3 prior steps. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
|