View previous topic :: View next topic
|
Author |
Message |
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
Hi ..
I know this topic has been discussed several times in this forum. But pls do clear this too )
Code: |
...........
...........
...........
//A
...........
...........
//B
...........
...........
//C
...........
...........
//D
|
In above JCL ... i want step C to be executed only when all prev. steps returns zero and also when B returns 1028.
(1028 RC is returned by COBOL pgm in step B)
im keeping "IF ENDIF" as my last option ... but pls do post those answers too .. |
|
Back to top |
|
|
hadimam Currently Banned New User
Joined: 15 Jun 2006 Posts: 10 Location: Bangalore
|
|
|
|
Hi,
code the condition code.LT.1028 in the second step of the job and cond=0 for the step1.
The C step will be executed.
Hadimam |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
Yes,
You can have both conditions check at the same step.
For Example:
..................
..................
//A
..................
..................
//B
..................
..................
//C
COND.B=(1028,NE), COND.A=(0,LT)
You can have any number of conditional checks in the same step
~Vamsi |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
shreevamsi wrote: |
Yes,
You can have any number of conditional checks in the same step
~Vamsi |
no. max 8 conds |
|
Back to top |
|
|
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
Thanks for the reply ... just like to add few for info ....
Steps A & B are not the only steps preceding C ... so there are many steps ... all the steps preceding C will give Zero on successful run whereas Step B will throw Zero or 1028 on successful run
Quote: |
1028 is valid Condition code as it is set in a cobol program |
And pls consider that they are many steps following c too ...
Please advice... Thanks in advance |
|
Back to top |
|
|
Hanfur
Active User
Joined: 21 Jun 2006 Posts: 104
|
|
|
|
u can use IF THEN ELSE
//BYPASS IF (A.RC = 0 AND B.RC = 1028) THEN
//C EXEC PGM=C
//
This will ensure to run C based the return code of StepA is zero and fir Step B is 1028.
If u have other steps too u may have to add more conditions in AND as given above ;to decide a step should be excuted or not
QUOTE:And pls consider that they are many steps following c too
-Han. |
|
Back to top |
|
|
|