- Computers & Software»
- Computer Science & Programming
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.