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

Regarding COND Parameter


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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Mar 18, 2010 8:22 pm
Reply with quote

Hi,

I have 10 steps in a Job.

Requirement is
1) Every Odd step should execute irrespective of the return code from any of the previous steps.
i.e. STEP1, STEP3, STEP5, STEP7, STEP9

2) Every Even step should execute only if its preceeding step executes successfully. (Return code = 0)
i.e. STEP2 should run only if STEP1 executes successfully.
STEP4 should run only if STEP3 executes successfully.
STEP6 should run only if STEP5 executes successfully.
STEP8 should run only if STEP7 executes successfully.
STEP10 should run only if STE9 executes successfully.

Please help me in writing the COND parameters at each step.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 18, 2010 8:32 pm
Reply with quote

why not use the IF/THEN/ELSE??
much simpler to use and understand!
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 18, 2010 8:35 pm
Reply with quote

1. IEBEDIT should suffice, please serach the Forum on "IEBEDIT".
2. Please tell us what you've tried?
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Mar 18, 2010 9:33 pm
Reply with quote

Hi enrico-sorichetti

I know writing using IF/THEN.
Pls advice, how to write the code using COND parameter.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Mar 18, 2010 9:39 pm
Reply with quote

mkk157 wrote:
Hi enrico-sorichetti

I know writing using IF/THEN.
Pls advice, how to write the code using COND parameter.

Why are you using this inferior method?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 18, 2010 10:38 pm
Reply with quote

Quote:
Pls advice, how to write the code using COND parameter.


If You have the skill to evaluate alternatives and choose one with sound reasons
-- why one is better than the other

You should not have the need to ask how to implement any one of them

anyway how to write it is well explained in the manuals,
start from
www-03.ibm.com/systems/z/os/zos/bkserv/index.html
proceed to ( for example )
www-03.ibm.com/systems/z/os/zos/bkserv/v1r9books.html
www-03.ibm.com/systems/z/os/zos/bkserv/zshelves9.html
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IEA2BK81

and finally to
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B540/CCONTENTS?SHELF=IEA2BK81&DN=SA22-7598-04&DT=20040712160458
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B670/CCONTENTS?SHELF=IEA2BK81&DN=SA22-7597-11&DT=20070427231644

or for good training material go to
www.simotime.com/indexjcl.htm
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Mar 18, 2010 11:55 pm
Reply with quote

Hello,

While reviewing the reference material Enrico provided, keep in mind that steps that should always run need no COND=. The steps that depend on the prior step need to mention that step in the COND=. . .
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
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
Search our Forums:

Back to Top