TS/MP Management Programming Manual (G06.24+, H06.03+)

SPI Programming Considerations
NonStop TS/MP Management Programming Manual540082-001
3-23
Considerations
The Pathway subsystem can return an empty response if an application returns a
ZSPI-TKN-CONTEXT token and there are no more responses to be returned. The
return token ZSPI-TKN-RETCODE in the returned response always has the value
ZPWY-ERR-PM-EOF.
6. Take action appropriate to the information in the response.
Considerations
The response buffer always contains the return token, ZSPI-TKN-RETCODE. The
value of the ZSPI-TKN-RETCODE token is either zero (to indicate that the command is
successful), or it is a nonzero error number (to indicate that the command was not
performed). The command can contain error lists in either case.
Although the Pathway subsystem generates responses for all commands, responses
from some commands (such as INFO SC and STATUS SC) must be obtained from
fields within an extensible structured token. For example, the extensible structured
token in the INFO SC or STATUS SC command contains information about server
classes that is available from the PATHMON process. To refer to a field within an
extensible structured token, you must first obtain the entire structured token by using
SSGET. Then you refer to the fields of the structure by using the defined field names.
The PATHMON process does not provide support for selecting the types of responses
to be returned with the SPI standard token ZSPI-TKN-RESPONSE-TYPE. The
Pathway subsystem always returns a response for every object—whether or not errors
or warnings occur for the object. For more information on sending messages and
receiving the responses, see the SPI Programming Manual.
Error Handling
Each response returned by the Pathway subsystem includes a return token (ZSPI-
TKN-RETCODE), whose value indicates whether an error occurred when the
PATHMON process attempted to perform the command. An error is a serious condition
that prevents the command from being completed. If the command completes with no
errors, the value of the return token is zero. If ZSPI-TKN-RETCODE has any nonzero
value, this means that an error occurred. In this case, the PATHMON process includes
an error list in the response, providing information about the error.
A warning reports a condition less serious than that of an error. If no errors occur but a
warning occurs, the return token has a value of zero, but an error list appears in the
response, providing information about the warning condition.
An error list, which always begins with the token ZSPI-TKN-ERRLIST and ends with
the token ZSPI-TKN-ENDLIST, is returned only if an error is detected. The information
in the list becomes accessible when your program calls SSGET to select ZSPI-TKN-
ERRLIST. Although the Pathway subsystem only returns one error list per response,
there can be nested error messages.