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
 

 

condition parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: condition parameter
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    Post subject: Re: condition parameter
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    Post subject:
Reply with quote

you can have a look at the following link

http://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    Post subject:
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    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 Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


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