IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Two Condition codes in same step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meetsrk

New User


Joined: 13 Jun 2004
Posts: 85

PostPosted: Wed Jul 05, 2006 10:52 am
Reply with quote

Hi ..

I know this topic has been discussed several times in this forum. But pls do clear this too icon_smile.gif)

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
View user's profile Send private message
hadimam
Currently Banned

New User


Joined: 15 Jun 2006
Posts: 10
Location: Bangalore

PostPosted: Wed Jul 05, 2006 11:45 am
Reply with quote

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
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Wed Jul 05, 2006 1:50 pm
Reply with quote

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
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Wed Jul 05, 2006 11:52 pm
Reply with quote

shreevamsi wrote:
Yes,


You can have any number of conditional checks in the same step

~Vamsi


no. max 8 conds
Back to top
View user's profile Send private message
meetsrk

New User


Joined: 13 Jun 2004
Posts: 85

PostPosted: Wed Jul 05, 2006 11:59 pm
Reply with quote

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
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Thu Jul 06, 2006 12:48 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
No new posts AI writing DFSORT, REXX codes.. All Other Mainframe Topics 3
Search our Forums:

Back to Top