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
 

 

What happened if specified as COND=(0,LT)

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

New User


Joined: 23 Mar 2005
Posts: 25

PostPosted: Wed Apr 06, 2005 11:13 am    Post subject: What happened if specified as COND=(0,LT)
Reply with quote

//step1 exec pgm=program1
//step2 exec pgm=program2, cond=(0,LT)

if u specify like this wat will happen to step2
Back to top
View user's profile Send private message

sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
Location: hyderabad

PostPosted: Wed Apr 06, 2005 12:26 pm    Post subject: Re: cond parameter
Reply with quote

Hi keerthi

step2 executes only if step1 executes correctly ie return code of step1 is 0

as 0 LT 0 is not true...step2 executes

if step1 return code is non zero ie..4 suppose
as 0 LT 4 is true---step2 will not execute




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

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Apr 07, 2005 12:26 am    Post subject: Re: What happened if specified as COND=(0,LT)
Reply with quote

The more commonly used equivalent is:
Code:

//STEP1 EXEC PGM=PROGRAM1
// IF (STEP1.RC = 0) THEN
//STEP2 EXEC PGM=PROGRAM2
// ENDIF
Back to top
View user's profile Send private message
aishwarya_singh

New User


Joined: 06 Apr 2005
Posts: 21

PostPosted: Thu Apr 07, 2005 12:09 pm    Post subject: Re: What happened if specified as COND=(0,LT)
Reply with quote

Hi,

I suppose step2 will be executed each time if the condition code for step1 is zero or greater than zero....And if the condition code for step1 is less than 1 then step2 will not be executed and that will never happen since no condition code is less than zero.

If i am wrong then please tell me.

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

New User


Joined: 06 Apr 2005
Posts: 9
Location: Bangalore

PostPosted: Thu Apr 07, 2005 1:08 pm    Post subject: Re: What happened if specified as COND=(0,LT)
Reply with quote

Aishwarya,

when ever the condition code is false only step2 will execute.
For example
(0,LT,8) in this case condition is true and step2 never executes. So step1 should always return a zero code then only step2 will execute. If it returns non zero return code then step2 never executes.

We don't have any negative return codes in jcl



Hope this will help you
Back to top
View user's profile Send private message
aishwarya_singh

New User


Joined: 06 Apr 2005
Posts: 21

PostPosted: Thu Apr 07, 2005 1:19 pm    Post subject: Re: What happened if specified as COND=(0,LT)
Reply with quote

Thank you thiru.guduru, i was confused.
Back to top
View user's profile Send private message
keerthi

New User


Joined: 23 Mar 2005
Posts: 25

PostPosted: Sun Apr 10, 2005 5:54 pm    Post subject: Re: What happened if specified as COND=(0,LT)
Reply with quote

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

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Apr 11, 2005 2:02 am    Post subject:
Reply with quote

This might help. I know it helped me.

Read "cond=(0,LT)" as:

If zero is less than any pervious RC, DON'T execute this step.

Another example:

Read "cond=(0,LE)" as:

If zero is less than or equal to any pervious RC, DON'T execute this step.

This one can be used to effectively DELETE the step from the jobstream. When you want it back restore the original COND clause.
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 how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
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
No new posts How to detect the Job COND used tdfs JCL & VSAM 28 Tue Feb 09, 2016 8:34 pm
No new posts Repeating input records for variable ... ksouren007 DFSORT/ICETOOL 1 Fri Jul 31, 2015 4:16 pm


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