View previous topic :: View next topic
|
Author |
Message |
amolj
New User
Joined: 08 Nov 2006 Posts: 21 Location: india
|
|
|
|
Hi all....
following is my requirement....
step 30 should execute when step 20 issues a Return code of 1 or 3... step 20 is the immediate preceding step of step 30...
i have tried following COND statement... it is giving me an error...
Code:
COND=((1,NE,STEP020),(3,NE,STEP020))
I also Tried following condition...
Code:
COND=((1,LT,STEP020),(3,GT,STEP020),(2,EQ,STEP020))
--Amol |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi Amol try the following and please let me know whether ot works or not:
Code: |
// IF (STEP20.RC EQ 1 OR STEP20.RC EQ 3) THEN
//STEP30 EXEC PGM=XXXX
// ENDIF
|
Please note the space between the delimitor and IF as well as ENDIF |
|
Back to top |
|
|
amolj
New User
Joined: 08 Nov 2006 Posts: 21 Location: india
|
|
|
|
Thnks Swapnadeep...
It is working fine now... but i wanted to know whether it is possible to these conditions in COND statement onle instead of IF... |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Amol,
Can you post here the error you got... Definitley it is possible thru COND.
Thanks,
Arun |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi Amol,
The COND parameter provided by you should work fine.
Code: |
COND=((1,NE,STEP020),(3,NE,STEP020))
|
|
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Swanadeep,
Quote: |
COND=((1,NE,STEP020),(3,NE,STEP020)) |
Did you try this? Also, refer manual how above COND gets evaluated. |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Murali please correct me if I am wrong in my understanding:
As far as I understood, the step30 is to execute only if step020 returns a code equal to 1 or 3.
Now in the above COND parameter, step030 is bypassed if 1 is not equal to the return code issued by step020 or if 3 is not equal to the return code issued by step030. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Swapnadeep,
As suggested, you should have gone thru manual for COND parm evaluation.
Quote: |
COND=((1,NE,STEP020),(3,NE,STEP020)) |
When both the conds satisfy, the step is executed. In other words AND rule applies here. |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Thank you Murali to point out the error in my understanding. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
happy conclusion to the cond saga....
&deity &bless IBM for introducing the "// IF" !!! |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Code: |
IBM for introducing the "// IF" |
And withit OR. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Amol,
Try this COND code .....
Code: |
COND=((3,LT,STEP020),(0,EQ,STEP020),(2,EQ,STEP020))
|
Thanks,
Arun |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Arun,
Quote: |
Try this COND code ..... |
One word - Good. |
|
Back to top |
|
|
|