View previous topic :: View next topic
|
Author |
Message |
BalaMuraliL
New User
Joined: 01 Aug 2007 Posts: 10 Location: Pune
|
|
|
|
Hi,
I have small Doubt on Multiple Conditions ( COND Parameter).
Take for example, I have below JCL with multiple conditions
//STEP1 EXEC PGM=PGMONE
//STEP2 EXEC PGM=PGMTWO
//STEP3 EXEC PGM=PGM3,COND=((4,EQ),(8,LE),(16,EQ))
Well, coming to the question..
Q1 : Among all 3 conditions in COND parameter ,Is it will always check for FALSE to get execute STEP3 even though the first and second conditions are TRUE ? ( as it will apply "OR" it will look for TRUE or FALSE)
Q2: If First condition ( 4, EQ ) is TRUE , Then What action will it take ? Is it will quit from the condition that we got TRUE status Or is it will check the second condition (8,LE) and further conditions (16, EQ) also ?
As per my knowledge , It will always check for the FALSE status to get execute the STEP3. Until it finds FALSE it will check all the multiple conditions.... Is my assumption is correct ? Please correct me if my assumption is wrong !! Thank You. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I'd suggest you think of this differently
Quote: |
It will always check for the FALSE status to get execute the STEP3. |
When a COND= test is true, the step will not execute. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
According to the Z/OS V1R7.0 MVS JCL Reference manual:
Quote: |
If any of the test conditions are satisfied, the system evaluates the COND parameter as true and bypasses the job step. If none of the test conditions specified on the COND parameter are satisfied, the system evaluates the COND parameter as false and executes the job step.
|
|
|
Back to top |
|
|
BalaMuraliL
New User
Joined: 01 Aug 2007 Posts: 10 Location: Pune
|
|
|
|
Hi Superk,
This is continuation for your last reply . First of all thanks a lot for your inputs. Let me put my doubt bit clearly based on your inputs...
As per your last reply Explanation
1.
If any of the test conditions are satisfied : As per this statment, First of all , It is checking all the condition that what ever we coded in One COND statement Right ?
2.
the system evaluates the COND parameter as true and bypasses the job step : This is general point in COND . I will agree with this stmt.
3.
If none of the test conditions specified on the COND parameter are satisfied : It means it is checking all the conditions right ?
As per the 1 & 3 statements , if we code multiple conditions , the system is checking all the conditions that what ever we coded on COND . When the system is checking the multiple conditions, system may find TRUE Or FALSE / All TRUE ( in this case it will bypass ) / All FALSE ( in this case it will execute) . But, If it finds TRUE & FALSE .... In this case which one will it take ? Either TRUE / FALSE ?
Hope it is clear my doubt.. Please let me know if have are not cleare with question. Thank You. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please take the time to read the answer given by Superk, think about it, and your answer will be given.
Take special notice of the word ANY |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
BalaMuraliL wrote: |
But, If it finds TRUE & FALSE .... In this case which one will it take ? Either TRUE / FALSE ? |
Do you understand the difference between the Boolean concept of TRUE and FALSE?
There is a difference betwen AND and OR, do you understand it?
Do you understand the defaults? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The answer you need was the first reply.
Quote: |
When a COND= test is true, the step will not execute. |
followed by the post from SuperK which is a direct quote from the manual.
While it may be slightly confusing (because to many it seems backwards), the step will be bypassed when a COND= is true.
If you "overthink" it, it will completely jumble. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
old school way of remembering COND results was
N E R T S as in ANY ARE TRUE, SKIP this step |
|
Back to top |
|
|
|