JCL override with examples

JCL override with examples

JCL/PROC override is useful when a proc parameters, data sets needs to be modified while executing it. Adding parameters, Nullifying the existing parameters or Overriding the parameters of a PROC are the common overrides that can be done via a JOB.

Overriding a DSN:

PROC has an input data set and this needs to be modified while running the job. So below override can be used.

JOB with Override DSN

Here the JOB gets executed with the new data set given in the JOB instead of the dataset given in the PROC

If the PROC has only one step then Procstep name is not required. It can be coded as below

If there are multiple steps and in each step the DD name is same then ignoring proc step name overrides only the first step values.

Example:

JOB:
In this case only the INFIL of PRC001 gets overridden.

Overriding DSN SUb parameters.

UNIT, Volume, Space etc parameters specified against the DSN can also be modified from the job.

PROC:

Wrong way of coding the job
We can not code only the required sub parameter. Here All the parameters whether they are required to be modified or not should be specified.

Correct Way:
Sub parameters given in the override step would be effective. If you Omit the DSN sub parameters(DISP, UNIT, DCB etc), then these will not be nullified instead it takes this data from the PROC if they exist.

Nullifying the Parameters:

IN case the parameters specified in the PROC needs to be nullified then code it with out any value. It nullifies the specified sub parameters in all of the PROC steps.

If the parameters should be nullified in any particular step then step name should be mentioned.

Multiple parameters can be nullified.

Adding DSN SUb parameters.

Adding and Nullifying parameters can be given together.

Supplying IN stream Data:

NOTES:

PGM parameter can not be modified.

Leave a Reply

Your email address will not be published. Required fields are marked *