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

On cond parameter in JCL


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

New User


Joined: 17 Dec 2009
Posts: 2
Location: India

PostPosted: Fri Feb 05, 2010 12:42 pm
Reply with quote

Hi,

I have below steps in my JCL. Could you please guide me how to put condition on the requirement mentioned below:-

STEP05
STEP10
STEP15
STEP20
STEP25
STEP35 , cond(0,LT)
STEP35, cond(0,LT)


How to put a cond in Step 35 and 40 on the requirement.

STEP35 and STEP40 should not execute when STEP05,STEP10,STEP15 and STEP20 gives an return code other than zero.
but STEP35 and STEP40 should execute even if step25 gives a return code 4.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 05, 2010 12:54 pm
Reply with quote

Click the "IBM Manuals" button at the top of any page.

Read the section regarding COND= or better still the IF/THEN/ELSE/ENDIF section.

Please feel free to post further if you have problems understanding this.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Feb 05, 2010 12:56 pm
Reply with quote

What if STEP05,STEP10,STEP15 and STEP20 gives gives non zero and
STEP25 gives 4?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 05, 2010 1:01 pm
Reply with quote

Sambhaji wrote:
What if STEP05,STEP10,STEP15 and STEP20 gives gives non zero and STEP25 gives 4?

That is why I suggested the IF/THEN/ELSE/ENDIF section.
Far more flexible and easier to comprehend.

And in fact, given Sambhaji's scenario - the only viable solution.
Back to top
View user's profile Send private message
Ashaaz

New User


Joined: 17 Dec 2009
Posts: 2
Location: India

PostPosted: Fri Feb 05, 2010 1:01 pm
Reply with quote

Sambhaji,

In response to your answer,

Step35 and Step40 should bypass
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Feb 05, 2010 2:25 pm
Reply with quote

Expat wrote:
That is why I suggested the IF/THEN/ELSE/ENDIF section.
Far more flexible and easier to comprehend.

Yeah.. Thats right.. I was just trying to make poster clear on his own requirement..
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Feb 05, 2010 2:32 pm
Reply with quote

I wonder why for cond code and if/then else logic people have not learned or have not been taught on how to simulate it

Code:
//jobname  JOB ......
//*
//step1   EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  SET MAXCC=<somevalue>
//step2   EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  SET MAXCC=<somevalue>
//step3   EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  SET MAXCC=<somevalue>
//step... EXEC PGM=IDCAMS
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  SET MAXCC=<somevalue>


adding the proper COND and IF/THEN/ELSE
and changing appropriately the MAXCC setting
anybody can emulate/simulate/test all the return code combinations,
easily and without troubles
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