Return codes for each option are returned in the variables &$DSRC and &RETCODE. &$DSFDBK may also be set. The return codes are as follows:
Function completed. &$DSFDBK will normally be 0 but can also be set to another value to provide additional information. This is documented under each specific function.
A Dataset Services error has occurred and the function is incomplete. This is typically a run-time error. The specific error is indicated in &$DSFDBK and these are described in Feedback Codes in this chapter. The corresponding message for each code is N16Cxx (where xx is the feedback code) and is returned in &SYSMSG.
A Dataset Services Interface error has occurred and the function is incomplete. This is typically an application program specification error. The error is indicated in &SYSMSG with message number DSnnnn.
A system utility has returned a non-zero return code. This may be an error or a warning. &$DSFDBK contains the return code from the system utility, and the SYSPRINT file contains the output from the system utility.