Distributed Name Service (DNS) Management Programming Manual

Using SPI to Build Commands and Decode Responses
SPI Programming Considerations for DNS
3–8 46958 Tandem Computers Incorporated
Error Handling An error is a serious condition that prevents a command from being completed. Each
response returned by DNS includes a return token (ZSPI-TKN-RETCODE), whose
value indicates whether an error occurred when DNS attempted to perform the
command. If the command completed with no errors, the value of the return token is
zero (ZDNS-ERR-NOERR). Some DNS error replies contain information about the
error, in addition to the error number in ZSPI-TKN-RETCODE. This additional
information is enclosed in an SPI error list (ZSPI-TKN-ERRLIST) and does not utilize
structured tokens.
If ZSPI-TKN-RETCODE is nonzero, the command was not successful. Where a
nonzero return code is present, the response buffer may contain one or more error
lists. Even if the return code is zero, the response may still contain error lists that
describe warnings. A warning reports a condition less serious than an error. If no
errors occurred but a warning did occur, an error list appears in the response,
providing information about the warning condition.
General programming considerations for handling-errors and warnings reported in
responses are discussed in the Distributed Systems Management (DSM) Programming
Manual. Error handling considerations for specific commands are described along
with those commands in Section 5. Errors defined by the DNS subsystem, together
with the contents of the error lists returned for them, are described in Appendix D.
DNS can also return common SPI, file-system, and I/O errors.
I/O Errors
If an error occurs when an I/O operation is performed on behalf of a request, the name
manager responds with ZSPI-TKN-ERROR = ZDNS-ERR-IOERR and includes a list as
follows:
[ZDNS.ZSPI-TKN-ERRLIST]
[ZDNS.ZSPI-TKN-ERROR] = ZDNS-ERR-IOERR
[ZFIL.ZSPI-TKN-ERRLIST]
[ZFIL.ZSPI-TKN-ERROR] = File-system error number
[ZFIL.ZFIL-TKN-FILENAME] = File name
[ZFIL.ZFIL-TKN-XFILENAME] = File name
[ZFIL.ZSPI-TKN-PROC-ERR] = File-system procedure
[ZFIL.ZFIL-TKN-OBJECTFILE] = Name manager object file
.
.
.