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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 191
Location: hyderabad

PostPosted: Wed Apr 06, 2005 12:26 pm
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

Global Moderator


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

PostPosted: Thu Apr 07, 2005 12:26 am
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
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
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
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
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
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 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 Reference for COND parameter. JCL & VSAM 1
No new posts IEF142I and Cond. Code 12 All Other Mainframe Topics 3
No new posts Cond parameter and Rc code of a proce... JCL & VSAM 5
No new posts INCLUDE COND with WHEN=GROUP SYNCSORT 12
Search our Forums:

Back to Top