Volumes and devices can be released:
when the job is terminated or aborted
by means of RELEASE (RELTFT macro): the devices and volumes allocated to a file are released
REMOVE-FILE-LINK command
by means of the SECURE-RESOURCE-ALLOCATION command: when this command is entered, all previously reserved volumes and devices are released.
If a job is deactivated (WAIT-EVENT command) or terminated (LOGOFF command) or if a job is aborted, the reserved devices are released implicitly.
RELEASE
The devices and volumes allocated to a file are released and the entry in the TFT is deleted. If a HOLD lock exists, the RELEASE command is executed only after input of the DROP command.
If tapes or devices assigned to the file are also implicitly reserved for other files or tapes, respectively, they are released only when all reservations have been released.
The macro call RELTFT ...,KEEP releases the file and any related volumes, but retains the reserved device(s).
REMOVE-FILE-LINK
The devices and volumes allocated to a file are released. REMOVE-FILE-LINK deletes any existing entry in the TFT. The tapes and tape devices allocated to the file are being released. If a LOCK-FILE-LINK lock exists for the file, the REMOVE-FILE-LINK command is executed only after /UNLOCK-FILE-LINK.
If tapes or devices assigned to the file are also implicitly reserved for other files or tapes, respectively, they are released only when all reservations have been released.
The REMOVE-FILE-LINK command with RELEASE-DEVICE=NO releases the file and any related volumes, but retains the reserved device(s).
SECURE-RESOURCE-ALLOCATION
If no operands are specified in the SECURE-RESOURCE-ALLOCATION command (abbreviated to SEC-RES), all devices and volumes reserved for the job are released. If further devices or volumes are requested in the command, all currently reserved devices are released before the new ones are reserved, unless reservations exist for open files.
This means that all previous reservations are reset if a SEC-RES command is rejected. In the following situations, however, they will be retained:
the rejection is due to a syntax error
the rejection is due to a tape file being open
the rejection is due to a TFT entry for the file being locked by a LOCK-FILE-LINK.
The SECURE-RESOURCE-ALLOCATION command will be rejected if a tape file is open or if a TFT entry for the file is locked with LOCK-FILE-LINK.