Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
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
References
PostPosted: Wed Apr 06, 2005 11:13 am    Post subject: Re: What happened if specified as COND=(0,LT) Reply with quote

sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 160
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: 3097
Location: Charlotte,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: 1481

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1