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


Examples of the LABEL parameter

z/OS MVS JCL Reference
SA23-1385-00

Example 1
//DD1  DD  DSNAME=HERBI,DISP=(NEW,KEEP),UNIT=TAPE,
//         VOLUME=SER=T2,LABEL=(3,NSL,RETPD=188)
DD statement DD1 defines a new data set. The LABEL parameter tells the system:
  • This data set is to be the third data set on the tape volume.
  • This tape volume has nonstandard labels.
  • This data set is to be kept for 188 days.
Although LABEL=(3,NSL,RETPD=188) is valid, it is better practice to use the DD RETPD parameter as follows:
//DD1  DD  DSNAME=HERBI,DISP=(NEW,KEEP),UNIT=TAPE,
//         VOLUME=SER=T2,LABEL=(3,NSL),RETPD=188
Example 2
//DD2  DD  DSNAME=A.B.C,DISP=(,CATLG,DELETE),UNIT=3390,LABEL=(,NL)

DD statement DD2 defines a new data set, requests that the system catalog it, and indicates that the data set has no labels. Each time this data set is used by a program, the DD statement must include LABEL=(,NL).

Example 3
//DD3  DD  DSNAME=SPECS,UNIT=3390,VOLUME=SER=10222,
//         DISP=OLD,LABEL=4

DD statement DD3 indicates an existing data set. The LABEL parameter indicates that the data set is fourth on the tape volume.

Example 4
//STEP1  EXEC PGM=FIV
//DDX    DD   DSNAME=CLEAR,DISP=(OLD,PASS),UNIT=3390,
//            VOLUME=SER=1257,LABEL=(,NSL)
//STEP2  EXEC PGM=BOS
//DDY    DD   DSNAME=*.STEP1.DDX,DISP=OLD,LABEL=(,NSL)

DD statement DDX in STEP1 indicates an existing data set with nonstandard labels and requests that the system pass the data set. DD statement DDY in STEP2 receives the data set. DDY contains the label type, because the system does not obtain the label type through the backward reference in the DSNAME parameter.

Example 5
//DDZ  DD  DSNAME=CATDS,DISP=OLD,LABEL=(,SUL)

DD statement DDZ indicates an existing, cataloged data set on direct access. The data set has IBM® standard labels and user labels. The LABEL parameter is required; otherwise, if the DD statement does not contain a LABEL parameter, the system assumes that a direct access data set has SL labels.

Example 6
//DD7  DD  DSNAME=TOM1,DISP=(NEW,KEEP),LABEL=EXPDT=2006/033,
//         UNIT=3390,SPACE=(TRK,(1,1)),VOLUME=SER=663344

DD statement DD7 defines a new data set, requests the system to keep the data set, and indicates that the data set cannot be deleted or written over until the expiration date of February 2, 2006.

Although LABEL=EXPDT=2006/033 is valid, it is better practice to use the DD EXPDT parameter as follows:
//DD7  DD  DSNAME=TOM1,DISP=(NEW,KEEP),EXPDT=2006/033,
//         UNIT=3390,SPACE=(TRK,(1,1)),VOLUME=SER=663344

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014