View previous topic :: View next topic
|
Author |
Message |
shalini bhat
New User
Joined: 26 Feb 2007 Posts: 4 Location: India
|
|
|
|
1.Is the value of COND , stored in a register? IF so, when I say COND=(4,GT), then am I just checking the return code of the previous step or all the steps ?
2.When there is a COND on the job stmt, is the first step in the JCL tested against this condition or is it just ignored |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Shalini wrote
Quote: |
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.
Shalini wrote:
Quote: |
When there is a COND on the job stmt, is the first step in the JCL tested against this condition or is it just ignored |
The first step in the job will not be tested against the condition, since it is a new job. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe this is incomplete:
Quote: |
Quote:
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. |
|
Back to top |
|
|
udaybarath
New User
Joined: 10 May 2005 Posts: 7
|
|
|
|
Muthuvel wrote
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.
In the above example:
If step1 returns a code of greater than 4, then the step 2 is bypassed???
No it should execute.........muthuvel small mistake in your explanation. |
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
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
COND=(4,GT)
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,
yes/no? |
|
Back to top |
|
|
|