Examples of the UNIT parameter
//STEP2 EXEC PGM=POINT
//DDX DD DSNAME=EST,DISP=MOD,VOLUME=SER=(42569,42570),
// UNIT=(3480,2)
//DDY DD DSNAME=ERAS,DISP=OLD,UNIT=3480
//DDZ DD DSNAME=RECK,DISP=OLD,
// VOLUME=SER=(40653,13262),UNIT=AFF=DDX
DD statement DDX requests two 3480 tape devices, DD statement DDZ requests the same two devices as DDX. Note that the operator will have to change volumes on the two 3480 devices during execution of the job step.
DD statement DDY requests one 3480 tape device.
//DD1 DD DSNAME=AAG3,DISP=(,KEEP),
// VOLUME=SER=13230,UNIT=3400-5
This DD statement defines a new data set and requests that the system assign any 3420 Magnetic Tape Unit that can operate in 6250 BPI NRZI nine-track format.
//DD2 DD DSNAME=X.Y.Z,DISP=OLD,UNIT=(,2)
This DD statement defines a cataloged data set and requests that the system assign two devices to the data set. The system obtains the device type from the catalog.
//DD3 DD DSNAME=COLLECT,DISP=OLD,
// VOLUME=SER=1095,UNIT=(3490,,DEFER)
This DD statement defines an existing data set that resides on a tape volume and requests that the system assign a 3490 tape device. Because DEFER is coded, the volume will not be mounted until the data set is opened.
//STEPA DD DSNAME=FALL,DISP=OLD,UNIT=237
For this data set, the system retrieves the volume and device type from the catalog. The UNIT parameter, by specifying device 237, overrides the catalog device type; however, device 237 must be the same type as the device stated in the catalog.
Example 6: This example shows the use of the ALLOCxx UNITAFF default.
- UNITAFF(3490) was specified in parmlib member ALLOC05, defining a 3490 as the default unit-affinity-ignored unit name. This default is used when unit affinity is ignored, the referenced DD is an SMS-managed request and the referencing DD is a NEW non-SMS-managed request, and the system is unable to obtain a unit from the primary DD in the unit affinity chain.
- The SMS ACS routines are defined so that:
- Data set L is to be redirected from tape to an SMS-managed DASD volume, SD3.
- Data set M is not to be redirected and is, therefore, still intended to go to a non-SMS managed tape volume.
//JOB2 JOB ......
//STEP1 EXEC ......
//DD11 DD DSN=L,DISP=(NEW),UNIT=3480,.....
//STEP2 EXEC ......
//DD21 DD DSN=L,DISP=OLD,......
//DD22 DD DSN=M,DISP=(NEW,CATLG),UNIT=AFF=DD21
In STEP1, DD11, data set L is created and cataloged on SD3, SMS-managed DASD (redirected using SMS ACS routines).
In STEP2, DD21, data set L is an existing data set and is cataloged on SD3, SMS-managed DASD. DD21 is both the referenced DD (referenced by the UNIT=AFF on DD22) and the primary DD.
In STEP2, DD22 is the referencing DD, which requests unit affinity to DD21. Because data set L is on SMS-managed DASD, the system cannot honor the unit affinity for DD22 which is intended to go to tape. With the unit affinity ignored, the system must determine a unit to be used for DD22.
The system is not able to rely on the unit information in the catalog for data set L, because the catalog reflects a DASD unit (as a result of being redirected). Because data set L was created in a prior step and there is no unit specified on DD21, the system is not able to use the JCL for DD21 as a source of unit information. The system will, therefore, use the unit-affinity-ignored unit name of 3490 for DD22.
//JOB7 JOB ......
//STEP1 EXEC ......
//DD01 DD DSN=A,DISP=SHR,UNIT=(/B5B8,,,SMSHONOR)
//DD02 DD DSN=B,DISP=SHR,UNIT=(MYTAPE,,DEFER,SMSHONOR)
To allocate to this Tape Library Request, the DD statement UNIT=(/B5B8,,,SMSHONOR) requires to use the device number B5B8, which is in the list of devices selected by SMS .
- the devices that are in the esoteric MYTAPE.
- the devices that are in the list selected by SMS.