navneet.dewangan
New User
Joined: 09 Oct 2005 Posts: 22 Location: INDIA
|
|
|
|
what will be the condition code for the following.
suppose there r two steps s1 and s2
I want to execute the s2 if s1 return code is 4 (for this example it is valid rc)
i answered cond (4,lt),(4,Gt) so was it the correct answer
plz answer me it is a basic but i always do mistake .
thanks |
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
navneet.dewangan,
What you have is:
Code: |
//S1 EXEC PGM=PROG1
:
//S2 EXEC PGM=PGOG2,COND=((4,lt),(4,Gt))
|
This will work. the COND= says SKIP this step if the condition is true. However, how you have the COND stated, if ANY step prior to S2 generated a RC LT 4 or GT 4, S2 would not execute. To execute S2 ONLY if S1 = 4, you should also specify the procstepname i.e.
Code: |
//S1 EXEC PGM=PROG1
:
//S2 EXEC PGM=PROG2,COND=((4,LT,S1),(4,GT,S1))
|
But, you don't have to state "LT" and "GT", you can use "NE"
Code: |
//S1 EXEC PGM=PROG1
:
//S2 EXEC PGM=PROG2,COND=(4,NE,S1)
|
Dave |
|
sundaresanjs
New User
Joined: 29 May 2006 Posts: 18 Location: USA
|
|
|
|
hi,
you can use this condition,
//s1 exec pgm=d
.
.
.
//s2 exec pgm=r,cond=(rc,NE,4)
will do
comment if any mistakes
thanks
regards
Sundaresan J |
|