In all our JOB Statement we have always COND=(4,LT) defined. Nevertheless when a Job failed the last step should then be executed (send a message to an user). Due to we don't like to change all our JOB's (ca. 2000), we are looking for a simply solution.

Answers were Sorted based on User's Feedback



In all our JOB Statement we have always COND=(4,LT) defined. Nevertheless when a Job failed the las..

Answer / himap

This is from JCL User guide....
Step Execution after a Preceding Step Abnormally Terminates
Abnormal termination of a step usually causes the system to bypass subsequent
steps and to terminate the job. However, the EXEC statement COND parameter
lets you request execution of a step by coding:
//stepname EXEC PGM=x,COND=EVEN
The step is to be executed even if one or more of the preceding steps
abnormally terminates. That is, the step will always be executed, whether or not
a preceding step abnormally terminates.
//stepname EXEC PGM=x,COND=ONLY
The step is to be executed only if one or more of the preceding steps
abnormally terminates. That is, the step will not be executed, unless a
preceding step abnormally terminates.
If a step abnormally terminates, the system scans the EXEC COND parameter for
the next step for an EVEN or ONLY subparameter. If neither is present, the system
bypasses the step. If EVEN or ONLY is specified, the system makes any requested
return code tests against the return codes from previous steps that executed and
Chapter 10. Processing Jobs - Processing Control 10-7
Processing Jobs - Processing Control
did not abnormally terminate. The step is bypassed if any test is satisfied.
Otherwise, the step is executed.
Note: Certain error conditions prevent the system from executing a step,
regardless of any requests specified through the COND parameter. Other
considerations are also related to the use of the COND parameter. For
information on cautions when specifying COND parameters, see the
description of the COND parameter on the EXEC statement in OS/390 MVS
JCL Reference.

Hope this answers your question.

Is This Answer Correct ?    2 Yes 0 No

In all our JOB Statement we have always COND=(4,LT) defined. Nevertheless when a Job failed the las..

Answer / anudeep

Hi,

Please used COND=ONLY in your last step which has to be executed whenever the jobs fails.
Thanks.

Is This Answer Correct ?    0 Yes 1 No

In all our JOB Statement we have always COND=(4,LT) defined. Nevertheless when a Job failed the las..

Answer / herm ballast

The COND in the JOB Statement overwrites all the COND in the STEP Statement, so it does work.

Is This Answer Correct ?    0 Yes 1 No

In all our JOB Statement we have always COND=(4,LT) defined. Nevertheless when a Job failed the las..

Answer / anudeep

Hi ,

You can use the keyword COND=ONLY at the last.
This step will execute only if the job fails at any step.

Thanks,
Anudeep

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More JCL Interview Questions

Explain the purpose of dd dummy statement?

0 Answers  


A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?

4 Answers   IBM,


What does a disposition of (NEW,CATLG,DELETE) mean?

3 Answers  


how you will define a temporary dataset in jcl?

1 Answers   IBM,


what is the function of iebcompr?....is it compare record length or characteristics of a dataset?...pls explain with examples.......

2 Answers  






what happens when time=0 is given in jcl code. what happens when blksize=0 is given in jcl code. what is symbolic and overriding parameters and a example program.

6 Answers   HCL,


In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?

14 Answers   Cap Gemini, Cognizant, JPMorgan Chase, TCS, Xansa,


Can we Execute a job without specifying Job Name in the Job Card?

2 Answers  


wht r different types of sorts ?

1 Answers   L&T,


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

0 Answers  


COND -> step1 . . step2, Step2, Executes if the CC of step1 is 0. But even if it is NOT 0 and if we dont give COND, will step2 be executed ?

4 Answers   IBM,


how can we override data definitions in jcl. can any one give detailed example

3 Answers   TCS,


Categories