Return codes from DFSMShsm commands

The following DFSMShsm commands issue return codes to indicate the success or failure of their operation:
  • HBACKDS
  • HDELETE
  • HMIGRATE
  • HRECALL
  • HRECOVER

Return codes are assigned in register 15. This allows the success or failure of the commands to be tested in a CLIST or batch job. Return codes come from one of two sets: default and extended.

The default set of return codes appear during normal DFSMShsm operations and provides a return code that indicates success or one of several errors.

The extended set of return codes is functional only when DFSMShsm commands are running in a truly interactive mode (TSO or foreground). This extended set of return codes, which appear when the EXTENDRC and the WAIT parameters are specified, provides a more detailed indication of processing results by returning both a return code and a reason code. The EXTENDRC parameter does not apply when it is used by a terminal monitor program (TMP) or when DFSMShsm commands are issued from a batch job; although DFSMShsm does not fail the command, the parameter is ignored. Because the extended set of return and reason codes may not be completed until after physical completion of backup processing, the HBACKDS command fails if you use both the CC and EXTENDRC keywords together.