z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Examples of the DSNAME parameter

z/OS MVS JCL Reference
SA23-1385-00

Example 1
//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.

Example 2
//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.

Example 3
//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.

Example 4
//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.

Example 5
//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.

Example 6
//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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014