COND Parmeter in JCL.
-
- New Member
- Posts: 4
- Joined: Mon Aug 11, 2014 9:28 am
COND Parmeter in JCL.
Hi,
I'm confused with COND parameter:
1.if I code COND=(0,LT) whether it checks previous step's RC is less than 0 or 0. I think that it will check if 0 is less than previous step's rc condition is false. So it'll execute that particular step. Please clarify me which is correct.
But then can RC be less than 0?
2. Let's assume if we COND=(4,LT) in step4 and step2's rc is 8 and step3's rc is 0 whether step4 will execute or not?
I'm confused with COND parameter:
1.if I code COND=(0,LT) whether it checks previous step's RC is less than 0 or 0. I think that it will check if 0 is less than previous step's rc condition is false. So it'll execute that particular step. Please clarify me which is correct.
But then can RC be less than 0?
2. Let's assume if we COND=(4,LT) in step4 and step2's rc is 8 and step3's rc is 0 whether step4 will execute or not?
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: COND Parmeter in JCL.
You are correct, the condition code can never be less than zero. So "always true". Experiment. Search. Read. COND= is confusing :-), so don't worry if you start off confused. If you work out yourself what is actually going on, you won't have to re-understand from someone's direct explanation, so it'll be easier for you.
-
- New Member
- Posts: 4
- Joined: Mon Aug 11, 2014 9:28 am
Re: COND Parmeter in JCL.
Thanks. So if I put COND=(0,LT) or COND=(0,EQ) they both should behave same?
-
- Website Team
- Posts: 70
- Joined: Wed Jul 31, 2013 10:19 pm
Re: COND Parmeter in JCL.
Hi Abhijit,
COND=(0,LT) will always execute the step on which it is coded as the condition will be always false whereas COND=(0,EQ) will bypass the step if previous steps executed with return code 0.
Regards,
Chandan
COND=(0,LT) will always execute the step on which it is coded as the condition will be always false whereas COND=(0,EQ) will bypass the step if previous steps executed with return code 0.
Regards,
Chandan
Re: COND Parmeter in JCL.
I did not get it, can you please elaborate?chandanyadav wrote:COND=(0,LT) will always execute the step on which it is coded as the condition will be always false whereas COND=(0,EQ) will bypass the step if previous steps executed with return code 0.
Regards,
Chandan
Re: COND Parmeter in JCL.
Write yourself a little program that takes a value as a parameter and uses that to issue a return code. Create a procedure with as many executions of the program as you need with differing parameters and condition codes and check out the results.
Regards
Nic
Nic
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute