SPI Programming Manual (G06.24+, H06.03+, J06.03+)
General SPI Programming Guidelines
SPI Programming Manual—427506-006
5-48
Reporting Errors From the SPI Procedures
Failure of SSGET on a Header Token
If SSGET fails when attempting to get any header token from a command, your 
subsystem should return an error response to report the problem. The return token of 
this response should be the one your subsystem defines to indicate that an SPI error 
occurred. The associated error list should contain the same error number and a nested 
error list constructed according to the guidelines given in the 
Guardian Procedure 
Errors and Messages Manual
. The command number and object type can be null or 
can be the values from the command.
Some suggestions:
•
Initialize a new buffer for a response (do not use ZSPI-TKN-DATAFLUSH on the 
command, because the command buffer might be the source of the problem). If the 
command number or object type has been retrieved from the command, your 
server can use them in the SSINIT call. Alternatively, for simplicity, your server can 
use the null values (ZSPI-VAL-NULL-COMMAND and ZSPI-VAL-NULL-OBJECT-
TYPE) whether or not they have been retrieved from the command.
•
Do not attempt to determine the value of ZSPI-TKN-MAXRESP; in this situation, 
your server probably cannot count on this value to be accurate. Return a single 
response record per response.
•
Check that the buffer used for this error response is large enough. Then, if any 
errors occur from the procedures called in creating the response, handle them as 
described in Failure of SSINIT When Initializing a Response Buffer
 or Failure of 
SSPUT When Building a Response on page 5-49.
Failure of SSGET on a Nonheader Token
If SSGET fails when getting a nonheader token from a command, the action depends 
on the error:
•
If the error is “token not found” and the token is optional for the command, take the 
default action for that token.
•
If the error is “token not found” and the token is required for the command, the 
response should contain the return-token value your subsystem defines for a 
missing required token, and an error list that identifies the token in question.
•
If the error is any other error, the error response should follow the same guidelines 
as for Failure of SSGET on a Header Token
 on page 5-48.
Some suggestions:
•
Initialize and build a response buffer as described in Failure of SSGET on a 
Header Token on page 5-48.
•
In this situation, it is not imperative that you ignore ZSPI-TKN-MAXRESP. 
However, for simplicity, HP recommends that you return a single response record 
per response.










