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

what is inrec fields and outrec fields in sorting

3 Answers   Fidelity,


Explain about Specifying compiler options in the PROCESS (CBL) statement

1 Answers  


What is Uncatalog dataset? How can we access/use them?

1 Answers  


I need exexution process for JCL programs

0 Answers  


can we have more than one job in a single job card that is we are specifying only one 'job' statement in the jcl.

7 Answers   Accenture,






lines(1,cancel)??What is meant by that??Plz explain it....

1 Answers   IBM,


What is a GDG? Why do we go for a GDG ? utility used to create GDG?

3 Answers   Xansa,


with out sorting how to copy records from one file to another file using jcl.Mean I have one input file in which the record are like 1,6,5,4,2,3(for example) and i want to copy to output file from top to bottom(without sorting) like 3,2,4,5,6,1.so I want the JCL for this.cna any one can answers?

1 Answers   TCS,


how to convert fb to vb in jcl ?

5 Answers   IBM, Infosys,


Statement1 "We can not use UNCATLG in SMS managed VSAM datasets" Statement2 "We can not delete a SMS managed data set without UNCATLG it" (P-353, Saba Zameer book) Then how do we delete SMS managed VSAM datasets ?

1 Answers   IBM,


How to execute 2nd and 4th steps among 5 steps in jcl proc?

0 Answers  


What is difference between Return Code, user completion code, Abend code and reason Code?

2 Answers   IBM, Satyam, Wipro,


Categories