GeekInterview.com
Series: Subject: Topic:
Question: 82 of 148

Explain the usage of COND parameter in JCL with an example

Asked by: Interview Candidate | Asked on: Apr 5th, 2007
Showing Answers 1 - 2 of 2 Answers
SWATI

Answered On : Apr 19th, 2007

1) The COND specifies condition for execution of subsequent job step depend on the return code from previous steps.
2) COND Can be coded in both JOB and EXEC statements. But COND written in EXEC stmt overrides on COND written in JOB stmt.
3) MAximum 8 conditions can be coded in the COND parameter. In case of multiple conditions if ANY of the  condition is found TRUE then the JOB stops proceeding further.
4)It bypasses the step if the condition is true.


SYNTAX :  COND=(CODE,OPERATOR,STEPNAME)
code can be 0 to 4095
Operator can be GT, LT, GE, LE, EQ
Stepname is optional,if omitted then the reurn code of all the steps are checked.

In EXEC you may find like

   COND=ONLY it allows step execution if any prior step is ABENDED
   COND=EVEN it allows step execution even if the prior step is ABENDED

 Example.
//STEP2 EXEC PGM=PROG12,COND=(4,GT,STEP1)

Here system bypasses the  STEP2 if 4 is greater than the return code from STEP1


 

Yes  3 Users have rated as useful.
  
Login to rate this answer.

COND is outdated. RTM and use IF THEN.

Yes  2 Users have rated as useful.
  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.