Examples of the DSNAME parameter
//DD1 DD DSNAME=ALPHA,DISP=(,KEEP),
// UNIT=3390,VOLUME=SER=389984
DD statement DD1 defines a new data set and names it ALPHA. DD statements in later job steps or jobs may retrieve this data set by specifying ALPHA in the DSNAME parameter, unit information in the UNIT parameter, and volume information in the VOLUME parameter.
//DDSMS1 DD DSNAME=ALPHA.PGM,DISP=(NEW,KEEP),DATACLAS=DCLAS1,
// MGMTCLAS=MCLAS1,STORCLAS=SCLAS1
DD statement DDSMS1 defines a new SMS-managed data set and names it ALPHA.PGM. DD statements in later job steps or jobs may retrieve this data set by specifying ALPHA.PGM in the DSNAME parameter.
//DD2 DD DSNAME=LIB1(PROG12),DISP=(OLD,KEEP),UNIT=3390
// VOLUME=SER=882234
DD statement DD2 retrieves member PROG12 from the partitioned data set named LIB1.
//DDIN DD DATA,DSNAME=&&PAYIN1
.
data
.
/*
DD statement DDIN defines PAYIN1 as the last qualifier of the system-generated data set name for the in-stream data set. This generates a data set name such as userid.jobname.jobid.Ddsnumber.PAYIN1.
//DDOUT DD DSNAME=&&PAYOUT1,SYSOUT=P
DD statement DDOUT defines PAYOUT1 as the last qualifier of the system-generated data set name for the sysout data set. This generates a data set name such as userid.jobname.jobid.Ddsnumber.PAYOUT1.
//DD3 DD DSNAME=&&WORK,UNIT=3390
DD statement DD3 defines a temporary data set. Because the data set is deleted at the end of the job step, the DSNAME parameter can be omitted. The following example shows why a temporary data set should be named.