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
 

 

Help needed with COND

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sriramvempaty

New User


Joined: 02 Aug 2007
Posts: 18
Location: india

PostPosted: Thu Nov 20, 2008 1:38 pm    Post subject: Help needed with COND
Reply with quote

Hi,

I have a job with below steps

step-1
step-2
--------------------
step-3 should run only when step-2 RC is 8
step-4 should run only if step-2 RC is 0
step-5 should run only if step-2 RC is 0
-------------------
step-6 should run only if step-5 RC is 8
step-7 should run only if step-5 RC is 0
step-8 should run only if step-5 RC is 0

Please help me out in setting up the conditions for the above steps.

I just want to set the conditions.

Thanks
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Nov 20, 2008 1:44 pm    Post subject: Reply to: Help needed with COND
Reply with quote

why don' t You try with the IF constructs
people who will have to maintain Your jcl will be grateful forever
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 20, 2008 1:44 pm    Post subject:
Reply with quote

Have you read the JCL manual to see how COND= works ?

Have you considered IF/THEN/ELSE as an alternate method ?
Back to top
View user's profile Send private message
Simon Jia

New User


Joined: 21 Nov 2008
Posts: 5
Location: China

PostPosted: Fri Nov 21, 2008 8:50 am    Post subject:
Reply with quote

in step 3 put this COND parm:
Code:
// .....COND=(8,EQ,STEP2)


you can figure out the rest, right?
Back to top
View user's profile Send private message
Simon Jia

New User


Joined: 21 Nov 2008
Posts: 5
Location: China

PostPosted: Fri Nov 21, 2008 8:57 am    Post subject:
Reply with quote

Simon Jia wrote:
in step 3 put this COND parm:
Code:
// .....COND=(8,EQ,STEP2)


you can figure out the rest, right?



Sorry, made a mistake here, the above code means, do NOT execute the step if step2's rc=8. If you want the step to be run only when step2's rc=8, use the following:
Code:
// .....COND=(8,NE,STEP2)

This means do not execute the step when step2's rc != 8...
Back to top
View user's profile Send private message
sriramvempaty

New User


Joined: 02 Aug 2007
Posts: 18
Location: india

PostPosted: Fri Nov 21, 2008 12:28 pm    Post subject: Reply to: Help needed with COND
Reply with quote

If else provided me the desired result.

Thanks.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Nov 23, 2008 7:10 am    Post subject:
Reply with quote

Thanks for considering IF/THEN/ELSE/ENDIF over COND. As Enrico said, your successors will appreciate it.
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. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm
No new posts Include Cond issue vickey_dw DFSORT/ICETOOL 6 Tue Mar 29, 2016 8:51 pm


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