IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Few questions on COND parameter


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shalini bhat

New User


Joined: 26 Feb 2007
Posts: 4
Location: India

PostPosted: Mon Mar 05, 2007 11:49 am
Reply with quote

1.Is the value of COND , stored in a register? IF so, when I say COND=(4,GT), then am I just checking the return code of the previous step or all the steps ?

2.When there is a COND on the job stmt, is the first step in the JCL tested against this condition or is it just ignored
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Mon Mar 05, 2007 4:40 pm
Reply with quote

Shalini wrote

Quote:
IF so, when I say COND=(4,GT), then am I just checking the return code of the previous step or all the steps ?


Yes,you are checking the previous step condition code.Let's assume Step 2 has COND=(4,GT),then if step1 returns a code of greater than 4,then the step 2 is bypassed else step is executed.

Shalini wrote:

Quote:
When there is a COND on the job stmt, is the first step in the JCL tested against this condition or is it just ignored


The first step in the job will not be tested against the condition, since it is a new job.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Mar 05, 2007 10:50 pm
Reply with quote

Hello,

I believe this is incomplete:
Quote:
Quote:
IF so, when I say COND=(4,GT), then am I just checking the return code of the previous step or all the steps ?


Yes,you are checking the previous step condition code.Let's assume Step 2 has COND=(4,GT),then if step1 returns a code of greater than 4,then the step 2 is bypassed else step is executed.



If you are in step5 and step1 issued the condition code, step 5 will be skipped. If steps 2,3&4 do not check the condition code they will execute.

As the COND=(4,GT) does not specify a particular step, the condition codes from all previous steps will be checked (not just the immediately previous step). You could check for particular steps if that was part of the design.
Back to top
View user's profile Send private message
udaybarath

New User


Joined: 10 May 2005
Posts: 7

PostPosted: Mon Mar 19, 2007 2:45 pm
Reply with quote

Muthuvel wrote

Yes,you are checking the previous step condition code.Let's assume Step 2 has COND=(4,GT),then if step1 returns a code of greater than 4,then the step 2 is bypassed else step is executed.

In the above example:
If step1 returns a code of greater than 4, then the step 2 is bypassed???

No it should execute.........muthuvel small mistake in your explanation.
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Wed Mar 21, 2007 4:48 pm
Reply with quote

The COND parameter is used to specify the return code tests that MVS
will perform to see if a job step will be executed or not.

Before a job step containing a COND= parameter is executed, the system performs the COND parameter test(s) specified against the return codes from all prior job steps (or the steps named on the COND= parameter).

If none of these tests is satisfied, the system executes the job step;
if any test is satisfied, the system skips the job step on which the COND= parameter is coded.

So when step2 has
COND=(4,GT)
If step 1 returns a code of greater than (GT) 4 then I would have thought that this condition has been satisfied? and thus the step will be bypassed,
yes/no?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
Search our Forums:

Back to Top