Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
I believe this is incomplete:
IF so, when I say COND=(4,GT), then am I just checking the return code of the previous step or all the steps ?
Yes,you are checking the previous step condition code.Let's assume Step 2 has COND=(4,GT),then if step1 returns a code of greater than 4,then the step 2 is bypassed else step is executed.
If you are in step5 and step1 issued the condition code, step 5 will be skipped. If steps 2,3&4 do not check the condition code they will execute.
As the COND=(4,GT) does not specify a particular step, the condition codes from all previous steps will be checked (not just the immediately previous step). You could check for particular steps if that was part of the design.
The COND parameter is used to specify the return code tests that MVS
will perform to see if a job step will be executed or not.
Before a job step containing a COND= parameter is executed, the system performs the COND parameter test(s) specified against the return codes from all prior job steps (or the steps named on the COND= parameter).
If none of these tests is satisfied, the system executes the job step;
if any test is satisfied, the system skips the job step on which the COND= parameter is coded.
So when step2 has
If step 1 returns a code of greater than (GT) 4 then I would have thought that this condition has been satisfied? and thus the step will be bypassed,