Volume serial return specification - Key = '005D'

DALRTVOL requests that the volume serial number associated with the allocated data set be returned. Only the first volume serial of a multiple-volume data set is returned, and the volume sequence number, if any, is ignored.

When you code DALRTVOL, # must be one, LEN must be six, and PARM is a six-byte field.

If the allocated volume serial is available at the completion of allocation, dynamic allocation puts the number in PARM. If the volume serial is not available at the completion of allocation, dynamic allocation sets LEN to zero.

The volume serial will not be available at the completion of allocation if either of the following is true:
  • No volume serial is allocated to the data set (a VIO or job entry subsystem data set)
  • The request results in the allocation of a new data set on magnetic tape without a specific volume serial having been assigned.

The system does not fail the dynamic allocation request if it cannot Start of changereturnEnd of change the volume serial number. Therefore, when you use this key, provide an SVC 99 request block extension (see Setting up the request block extension). Upon return, verify that fields S99EERR and S99EINFO in the request block extension are zero. If Start of changeeither or both ofEnd of change these fields are non-zero, do not use the returned volume serial number.

Example: To specify that the allocated volume serial be returned, code:
KEY    #      LEN    PARM
005D   0001   0006   ------
This specification would be updated for the allocation of data set ABC on volume 123456 as follows:
KEY           LEN    PARM
005D   0001   0006   F1 F2 F3 F4 F5 F6