View previous topic :: View next topic
|
Author |
Message |
keerthi
New User
Joined: 23 Mar 2005 Posts: 25
|
|
|
|
//step1 exec pgm=program1
//step2 exec pgm=program2, cond=(0,LT)
if u specify like this wat will happen to step2 |
|
Back to top |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The more commonly used equivalent is:
Code: |
//STEP1 EXEC PGM=PROGRAM1
// IF (STEP1.RC = 0) THEN
//STEP2 EXEC PGM=PROGRAM2
// ENDIF
|
|
|
Back to top |
|
|
aishwarya_singh
New User
Joined: 06 Apr 2005 Posts: 21
|
|
|
|
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 |
|
|
thiru.guduru
New User
Joined: 06 Apr 2005 Posts: 9 Location: Bangalore
|
|
|
|
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 |
|
|
aishwarya_singh
New User
Joined: 06 Apr 2005 Posts: 21
|
|
|
|
Thank you thiru.guduru, i was confused. |
|
Back to top |
|
|
keerthi
New User
Joined: 23 Mar 2005 Posts: 25
|
|
|
|
Thanks to Everybody |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|