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
 

 

On cond parameter in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: On cond parameter in JCL
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 05, 2010 12:54 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 05, 2010 1:01 pm    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Fri Feb 05, 2010 2:32 pm    Post subject: Reply to: On cond parameter in JCL
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    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
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
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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