JCL DISP Parameter

JCL DISP (Disposition) parameter is a Keyword parameter which is used to describe the status of a data set used in JCL to the OS. It indicates the OS on what should be done with the dataset after JOB/STEP termination. It has 3 sub parameters which indicates THE STATUS,Normal & abnormal termination ACTIVITIES of the JOB.

DISP=({status},{normal Disposition},{abnormal Disposition})

Normal & Abnormal dispositions are not mandatory for an old data set.

Status                            –> New, OLD, SHR, MOD are the valid values for Status.
Normal Disposition     –> CATLG, UNCATLG, DELETE, KEEP and PASS are the valid values.
Abnormal Disposition  –> CATLG, UNCATLG, DELETE and KEEP are the valid values.

New    -> Indicates that the specified DSN does not exist and it needs to be created.
OLD    -> DSn already exists and this step requires an exclusive access of this.
SHR    -> DSn already exists and this step requires shared access of this so that other jobs can use this dataset.
MOD   -> This is multipurpose sub-parameter, If the dataset exists then this is used to append the records at the end. If the dataset does not exists it is created in that step and used to write the records in to it.

CATLG -> It indicates the OS to create a catalog entry for the data set that is used here. Generally CATLG is used as the Normal disposition sub parameter to store the datasets information in to a catalog.

UNCATLG -> It deletes the catalog entry from the catalog file. In this case the data set exists but to retrieve it one should know its name, Unit & volume details.

DELETE -> it deletes the dataset, generally this sub parameter is used for abnormal disposition of a job step. And also used in Normal disposition when any existing file needs to be deleted.

KEEP -> It keeps the dataset but it does not do any catalog entry. So to access this dataset next time, complete details(name, VOlume & unit) of the dataset should be given.

PASS -> PASS is valid for Normal disposition only, this is generally used for temporary datasets which are created and deleted in the same job. PASS passes the dataset on to the subsequent steps in the same job. If in one step a temporary data set is to be created and this needs to be accessible to subsequent steps then PASS is used as normal disposition when it is being created.

NOTE: When a data set is cataloged, the data set information like Name, Volume & Unit are stored into a catalog dataset. Whenever a user wants to retrieve it, it can be retrieved just by giving its name. Without the cataloging, the user must know the dataset name along with its UNIT & Volume details.

Default DISP parameters

  • Using a default DISP parameters are not recommended as it is generally not suitable for most of the common requirement.
  • If the DISP parameter is Omitted, then it is DISP=(NEW,DELETE,DELETE).
  • If Status sub parameter is omitted, then NEW is taken by default.
  • If normal disposition is omitted, then DELETE is taken as default.
  • If abnormal disposition is omitted, then it is defaulted to the value specified in normal disposition. But if the normal disposition is KEEP, then for new datasets it is defaulted to DELETE and for OLD data sets it would be KEEP.

Different Combinations:


Here the dataset is a new dataset which should be created in step1. If the STEP1 ends normally then it gets cataloged. If it ends abnormally it gets deleted.

DISP=(,CATLG,DELETE)                         ==> as the status is omitted, it is defauled to NEW.
DISP=(MOD,DELETE,DELETE)             ==> Deletes the dataset. This does not abend when the specified dataset does not exist.
DISP=(OLD,DELETE,DELETE)              ==> Deletes the dataset. This abends when the dataset specified does not exist.
DISP=OLD                                                 ==> Used for OLD datasets and it gives the exclusive access over that dataset.
DISP=SHR                                                 ==> Used for OLD dataset where it gives a shared access. Genrally for input files it is used.
DISP=(NEW,PASS,DELETE)                   ==> FOR temp datasets.

DISP=(NEW,CATLG,CATLG)                 ==> this tells the system to create the dataset in normal & abnormal termination cases. This is rarely used case.



In another step it is used as below



Leave a Reply

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