View previous topic :: View next topic
|
Author |
Message |
sriramvempaty
New User
Joined: 02 Aug 2007 Posts: 18 Location: india
|
|
|
|
Hi,
I have a job with below steps
step-1
step-2
--------------------
step-3 should run only when step-2 RC is 8
step-4 should run only if step-2 RC is 0
step-5 should run only if step-2 RC is 0
-------------------
step-6 should run only if step-5 RC is 8
step-7 should run only if step-5 RC is 0
step-8 should run only if step-5 RC is 0
Please help me out in setting up the conditions for the above steps.
I just want to set the conditions.
Thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why don' t You try with the IF constructs
people who will have to maintain Your jcl will be grateful forever |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you read the JCL manual to see how COND= works ?
Have you considered IF/THEN/ELSE as an alternate method ? |
|
Back to top |
|
|
Simon Jia
New User
Joined: 21 Nov 2008 Posts: 5 Location: China
|
|
|
|
in step 3 put this COND parm:
Code: |
// .....COND=(8,EQ,STEP2) |
you can figure out the rest, right? |
|
Back to top |
|
|
Simon Jia
New User
Joined: 21 Nov 2008 Posts: 5 Location: China
|
|
|
|
Simon Jia wrote: |
in step 3 put this COND parm:
Code: |
// .....COND=(8,EQ,STEP2) |
you can figure out the rest, right? |
Sorry, made a mistake here, the above code means, do NOT execute the step if step2's rc=8. If you want the step to be run only when step2's rc=8, use the following:
Code: |
// .....COND=(8,NE,STEP2) |
This means do not execute the step when step2's rc != 8... |
|
Back to top |
|
|
sriramvempaty
New User
Joined: 02 Aug 2007 Posts: 18 Location: india
|
|
|
|
If else provided me the desired result.
Thanks. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Thanks for considering IF/THEN/ELSE/ENDIF over COND. As Enrico said, your successors will appreciate it. |
|
Back to top |
|
|
|