Tape devices can be reserved or allocated by means of a macro or command.
Macros
The user can control when the devices are actually assigned:
In the case of the FILE macro, the number of devices specified in the MOUNT operand are reserved (default value: one device is reserved). If MOUNT=0 is specified, no device is reserved. If necessary, this must be done at OPEN time
Devices are allocated during OPEN processing if no device was previously allocated with FILE
Commands
Tape devices can be reserved by means of the ADD-FILE-LINK command (with the operands VOLUME-LIST=*CATALOG and VOLUME-LIST=*TAPE-SET), by a SECURE-RESOURCE-ALLOCATION command, or as part of the OPEN processing for tape files. The user can control when the devices are actually assigned:
In the case of the ADD-FILE-LINK command, the number of devices specified in the NUMBER-OF-PREMOUNTS operand is allocated.
In the SECURE-RESOURCE-ALLOCATION command, the user can also specify how many devices are to be reserved for the job: if implicitly requesting devices by means of the FILE operand, the user can enter MOUNT=n to specify how many devices are needed. If MOUNT=0 is specified, any necessary devices are reserved only when the file is opened.
Devices are allocated during OPEN processing if no ADD-FILE-LINK or SECURE-RESOURCE-ALLOCATION command was issued previously, or if a device with an inappropriate volume type was allocated by a ADD-FILE-LINK or SECURE-RESOURCE-ALLOCATION command (in this case, a further device is allocated).
In the case of the MTC devices only identical specifications for the device type are compatible in the SECURE-RESOURCE-ALLOCATION and ADD-FILE-LINK commands.
A UNIT reservation has the disadvantage that the tape cannot be moved to a free tape device if a permanent hardware error occurs on the reserved device. Tape processing is terminated abnormally (SHOW-TAPE-STATUS shows ACTION=CANCELLED). It is therefore better to reserve devices either explicitly by specifying the device type or implicitly by reserving the required tape volumes.
If the requested volume is not mounted by the operator on the device reserved via UNIT, it must be moved to this device. If there was no UNIT reservation before the tape was requested, the tape can be mounted on any device which supports the requested recording density.