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

condition parameter


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

New User


Joined: 09 Oct 2005
Posts: 22
Location: INDIA

PostPosted: Tue May 23, 2006 8:16 pm
Reply with quote

what will be the condition code for the following.

suppose there r two steps s1 and s2
I want to execute the s2 if s1 return code is 4 (for this example it is valid rc)


i answered cond (4,lt),(4,Gt) so was it the correct answer
plz answer me it is a basic but i always do mistake .

thanks
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue May 23, 2006 8:53 pm
Reply with quote

navneet.dewangan,

What you have is:

Code:


//S1       EXEC PGM=PROG1
:
//S2       EXEC PGM=PGOG2,COND=((4,lt),(4,Gt))




This will work. the COND= says SKIP this step if the condition is true. However, how you have the COND stated, if ANY step prior to S2 generated a RC LT 4 or GT 4, S2 would not execute. To execute S2 ONLY if S1 = 4, you should also specify the procstepname i.e.

Code:


//S1       EXEC PGM=PROG1
:
//S2       EXEC PGM=PROG2,COND=((4,LT,S1),(4,GT,S1))



But, you don't have to state "LT" and "GT", you can use "NE"

Code:

//S1       EXEC PGM=PROG1
:
//S2       EXEC PGM=PROG2,COND=(4,NE,S1)


Dave
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue May 23, 2006 8:58 pm
Reply with quote

you can have a look at the following link

www.simotime.com/jclcon01.htm

regards
jai
Back to top
View user's profile Send private message
sundaresanjs

New User


Joined: 29 May 2006
Posts: 18
Location: USA

PostPosted: Mon May 29, 2006 6:28 pm
Reply with quote

hi,

you can use this condition,

//s1 exec pgm=d
.
.
.
//s2 exec pgm=r,cond=(rc,NE,4)


will do

comment if any mistakes


thanks


regards

Sundaresan J
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 Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top