View previous topic :: View next topic
|
Author |
Message |
pavankumarhassaji
New User
Joined: 20 Aug 2007 Posts: 11 Location: Canada
|
|
|
|
Hi,
I know that when we use COND parameter as COND=(0,NE) in a step, the condition will be checked against return code of all the previous steps executed.
But my requirement is to check the return code of only the previous step.
I can,t use the step name in COND parameter because my JOB has duplicate step names.
Can any body help me out on this.
Thanks,
Pavan Hassaji. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The answer is very well documented in the JCL reference manual |
|
Back to top |
|
|
pavankumarhassaji
New User
Joined: 20 Aug 2007 Posts: 11 Location: Canada
|
|
|
|
I checked the manual, it is same that the condition is checked against all the previous steps, not only the immidiate previous step.
My requirement is to get the condition of only previous step. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Sounds like a good reason for unique step names! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Yes, a problem as the CC check only does the first occurence of any given step name. |
|
Back to top |
|
|
pavankumarhassaji
New User
Joined: 20 Aug 2007 Posts: 11 Location: Canada
|
|
|
|
According to to the manual, in 16th chapter. the following info i could find
"stepname
Identifies the EXEC statement of a previous job step that issues the return
code to be used in the test. If the specified step is in a procedure, this step
must be in the same procedure. Otherwise, the specified step must not be in a
procedure; the specified step must contain a PGM keyword, rather than invoke
a procedure.
If you omit stepname, the code you specify is compared to the return codes
from all previous steps. If the return code issued by any of those previous steps
causes the test condition to be satisfied, the system evaluates the COND
parameter as true and bypasses the job step.If this step is invoked in JCL that runs as a started task, see “Stepnames for
Started Tasks” on page 16-2 for information about the stepname the system
assigns."
AND at another place i could find the following.
"Summary of COND Parameters
Figure 16-1. Execution or Bypassing of Current Step Based on COND Parameter
Test in COND Parameter
Return Code (RC) from a Previous Step
Execute Current Step Bypass Current Step
COND=(code,GT) RC >= code RC < code
COND=(code,GE) RC > code RC <= code
COND=(code,EQ) RC ¬= code RC = code
COND=(code,LT) RC <= code RC > code
COND=(code,LE) RC < code RC >= code
COND=(code,NE) RC = code RC ¬= code
Note: When the COND parameter does not name a previous step, the system tests all previous
steps. If any test is satisfied, the system bypasses the current step."
Apart from this if you know more info to solve my problem, please provide me with info.
Thanks,
Pavan Hassaji. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Apart from this if you know more info to solve my problem, please provide me with info. |
Change the job to have unique step names. In addition to condition code testing problems, using the same step name in multiple steps can make restarting the job a nightmare.
Most sites will not promote a job to production if it contains duplicate step names. |
|
Back to top |
|
|
|