0% found this document useful (0 votes)
36 views

Disposition

DISP indicates the disposition of a data set at different points in a job step and helps prevent simultaneous access. It has parameters for the initial status, normal termination, and abnormal termination that default to deleting new data sets and keeping old ones. Common DISP values create new permanent data sets, read existing ones, or create and pass temporary data sets between steps.

Uploaded by

preetisagar_vm
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Disposition

DISP indicates the disposition of a data set at different points in a job step and helps prevent simultaneous access. It has parameters for the initial status, normal termination, and abnormal termination that default to deleting new data sets and keeping old ones. Common DISP values create new permanent data sets, read existing ones, or create and pass temporary data sets between steps.

Uploaded by

preetisagar_vm
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

DISPOSITION (DISP)

Way to Go
Format of DISP Different parameter used Defaults used Examples

DISP
DISP is an operand of the DD statement DISP indicates what to do with the data set (the disposition) at step start, end, or abnormal end (if the job fails) DISP helps to prevent unwanted simultaneous access to data sets, which is very important for general system operation.

FORMAT
Status Normal
Disposition

Abnormal
Disposition

DISP=

NEW OLD SHR MOD

,DELETE ,KEEP ,CATLG ,UNCATLG ,PASS

,DELETE ,KEEP ,CATLG ,UNCATLG

Default is to delete new DS and keep the old one

Initial Status
NEW
Creation of new dataset (default)

OLD
Dataset exists and job step requires exclusive (unshared) use

SHR
Dataset exists and job step requests shared storage (Supported on DASD)

MOD
Sequential data set exists and is positioned at end of dataset Records added at the end (append) Exclusive usage

Normal Termination (NT) Parameter


DELETE
Dataset is deleted and space released

KEEP
Dataset is kept

PASS
Dataset is passed for use by a subsequent step within a job and catalog information is retained in memory

CATLG
Entry pointing to dataset in the system or user catalog created (Dataset kept)

UNCATLG
Entry pointing to dataset in the system or user catalog deleted

Abnormal Termination (AT) Parameter


DELETE
Dataset space released

KEEP
Dataset to be kept

CATLG
Entry pointing to dataset in the system or user catalog created Dataset kept

UNCATLG
Entry pointing to dataset in the system or user catalog deleted Dataset kept

Most Common DISP Coding


Common DISP Coding
DISP=(NEW,CATLG,DELETE) DISP=SHR DISP=(NEW,PASS,DELETE) DISP=(OLD,PASS) DISP=(OLD,DELETE)

Is used for Creating a new permanent data set

Reading an existing permanent data set


Creating a new passed data set

Reading & passing on a passed data set


Reading and deleting a passed data set

DISP defaults
Common DISP Coding
(no DISP) DISP = SHR DISP = OLD DISP=(NEW,PASS) DISP=(,CATLG) Is used for DISP=(NEW,DELETE,DELETE) DISP=(SHR,KEEP,KEEP) DISP=(OLD,KEEP,KEEP) DISP=(NEW,PASS,PASS) DISP=(NEW,CATLG,CATLG)

DISP=(,PASS)

DISP=(NEW,PASS,PASS)

Example 1
//STEP010 EXEC PGM=IEFBR14 //DD1 DD DSN=ABC,DISP=(SHR,KEEP) //DD2 DD DSN=SYSA,DISP=(OLD,DELETE,UNCATLG) //DD3 DD DSN=SYSB,UNIT=3350, // VOL=SER=335001,SPACE=(CYL,(4,2,1)), // DISP=(NEW,CATLG,KEEP) //DD4 DD DSN=&&SYS1,DISP=(MOD,PASS),UNIT=3350, // VOL=SER=335004,SPACE=(TRK,(15,5,1)) //STEP020 EXEC PGM=IEFBR14 //DD5 DD DSN=&&SYS1,DISP=(MOD,DELETE),UNIT=3350, // VOL=SER=335004,SPACE=(TRK,(15,5,1))

Example 2
To write a new member to PDS //STEP010 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DSN=NUSYJ51.PROJ.TMP1, // DISP=SHR //SYSUT2 DD DSN=NUSYJ51.PROJ.SOURCE(TMP1), // DISP=SHR

Example 3
//STEPA EXEC PGM=FILL //DD1 DD DSN=NUSYJ51.PROJ.TMP. UNIT=3353,VOLUME=SER=23562, SPACE=(TRK,(83,15)),DISP=(,PASS)
//STEPB EXEC PGM=CHAR //DD2 DD DSNAME=XTRA,DISP=OLD //DD3 DD DSN=*.STEPA.DD1,DISP=(OLD,PASS,DELETE)

//STEPC EXEC PGM=TERM //DD4 DD DSN=*.STEPB.DD3,DISP=(OLD,CATLG,DELETE)

Example 4
//STEP010 EXEC PGM=IEFBR14 //DEL1 DD DSN=NUSYJ51.PROJ.NEW, // DISP=(MOD,DELETE), // UNIT=SYSDA, // SPACE=(TRK,0)

Example 5
How to code STEPLIB for private load module library

//STEP010 EXEC PGM=COPYIT //STEPLIB DD DSN=SYS50.CA7LOAD.PROC // DISP=SHR

References
Practical MVS JCL EXAMPLES James G. Janossy
MVS JCL Users Guide - By IBM

Thanks

You might also like