Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Two Condition codes in same step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Two Condition codes in same step
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    Post subject: Re: Two Condition codes in same step
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    Post subject: Re: Two Condition codes in same step
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    Post subject: Re: Two Condition codes in same step
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    Post subject:
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    Post subject: Hi
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us