TS/MP 2.5 Management Programming Manual
Resetting Fields With the TACL Program
To reset fields of type FNAME32, CRTPID, or SUBVOL with the TACL program, you must use the
#SETBYTES built-in function. More information on resetting fields with the #SETBYTES built-in function
is available in the SPI Programming Manual.
Receiving and Decoding Response Messages
These subsections summarize the steps required to receive and decode SPI command responses.
These summaries are followed by subsystem-specific programming considerations for the Pathway
subsystem.
For more information on receiving and decoding SPI commands and responses, see the SPI
Programming Manual.
Summary of Steps
Here is a summary of the steps your application must take to receive and decode a response
message:
1. Declare a buffer of appropriate size.
2. Read the response message by using the mechanism appropriate to your programming
language (for example, a WRITEREAD call in TAL).
3. Call SSGET or SSGETTKN to retrieve the values of header tokens and other tokens from the
buffer.
4. On encountering the data-list token (ZSPI-TKN-DATALIST) or the error-list token
(ZSPI-TKN-ERRLIST), make another call to SSGET or SSGETTKN to retrieve the tokens inside
the data list, including the error list if one exists.
5. On encountering a context token (ZSPI-TKN-CONTEXT), finish reading the other tokens in the
buffer. Then, optionally, use SSMOVE or SSMOVETKN to copy the context token into the
command buffer, and resend the command to get the next message in the response.
The Pathway subsystem can return an empty response if an application returns a
ZSPI-TKN-CONTEXT token and no more responses are to be returned. The return token
ZSPI-TKN-RETCODE in the returned response 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 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 returns a response
for every object— regardless of whether 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
44 SPI Programming Considerations










