DD DISP parameter in jcl
What is the function of DD DISP parameter ?
The DISP parameter tells the disposition of the dataset. Go through the following syntax and examples with screen shots for better understanding of the concept.
Status: The status field tells the current status of a dataset i.e, whether dataset is exists or has to be created. Status values can be NEW,OLD,MOD,SHR
NEW: Status of the dataset is new and is not already exists. Going to create the new dataset
OLD: Dataset is already present.
MOD: Dataset may or may not exists. If not exists creates the new dataset. If exists then it's purpose is same as OLD.
SHR: Dataset can be used by multiple jobs at same time for read purpose
Normal-disposition: What to do with the dataset upon successful run of job(normal-termination of job).
Normal-disposition values can be CATLG,DELETE,PASS,KEEP
CATLG: Save the dataset and creates the catalog entry.
DELETE: Delete the dataset
PASS: Pass the dataset to the next steps. After completion of job run delete the dataset
KEEP: Keep the dataset. But no information will be available in catlog table about the dataset.
Abnormal-disposition: What to do with the dataset upon unsuccessful run of job(abnormal-termination of job).
abnormal-disposition values can be CATLG,DELETE,KEEP
Example screen shots
The Following example screen shots shows how we use the DISP parameter in JCL
In the above example File TEST.INPUT.FILE1 is used in shared mode. Shared mode means that when the file is used by the job A in shared mode, job B, job C ..etc can also use the same file in shared mode.
Alternate Syntax for DISP=(MOD,CATLG,DELETE)
More by this Author
In our previous tutorial we have learned how to send an email from mainframe JCL. This part of the tutorial explains how we can send an email with an attachment from mainframe with JCL code. IBM utility IEBGENER is...
Sort can be used to split the file into multiple files. SORT parameter OUTLIM is used to copy the contents of file into multiple files. The following are the examples to split the file using OUTLIM
No comments yet.