DD statement parameters that you can use for tape data sets. Here, the only parameters that are new are the RETPD, EXPDT, and LABEL parameters. RETPD and EXPDT let you set a time limit for how long a data set should be kept, and LABEL is the parameter that you use to specify the label type.
You will also use some sub parameters for the UNIT, VOLUME (VOL), and DCB parameters that apply specifically to tape data sets. Otherwise, you code the DD statement for a tape data set much as you do for a sequential DASD data set.
//ddname DD DSNAME=data-set-name,DISP=(status,normal-disp,abnormal-disp) [ ,UNIT=(subparameters) ] [ ,VOL=(subparameters) ] [ ,RETPD=nnnn | EXPDT=date ] [ ,LABEL=(subparameters) ] [ ,DCB=(options) ]
In the first example for instance, for an existing tape data set that’s cataloged, you only need to code the DSNAME and DISP parameters.
Then, the operating system gets the name and volume serial number from the catalog, and the label processing routines check to make sure that the right volume has been mounted and the right data set is available for processing.
Similarly, to allocate an uncataloged data set, you can code the UNIT and VOLUME parameters. In the second example, you can see that one tape volume has been specified for the file. In the third example, you can see that four volumes have been specified for a multi-volume file. And in the fourth example, you can see that no volume has been specified. So the operating system will select one.
The allocation of an existing cataloged data set //JOURNAL DD DSNAME=MMA2.AR.JOURNAL, DISP=OLD The allocation of an existing uncataloged data set //JOURNAL DD DSNAME=MMA2.AR.JOURNAL,DISP=OLD, UNIT=TAPE,VOL=SER=300123 The allocation of an existing, uncataloged multi-volume data set //JOURNAL DD DSNAME=MMA2.AR.JOURNAL,DISP=OLD, UNIT=TAPE, VOL=SER=(300111,300124,300125,300126) The allocation of a new data set on an unspecified tape volume //JOURNAL DD DSNAME=MMA2.AR.JOURNAL, DISP=(NEW,CATLG,DELETE), UNIT=TAPE