DSM/Tape Catalog Management Programming Manual
SPI Programming Considerations
DSM/Tape Catalog Management Programming Manual—520481-003
3-9
Error Handling
An application determines that it has received the last of a series of response 
messages when it receives a message that does not contain a context token. There 
are no additional response records for retrieval if MEDIASRV does not return the 
ZSPI-TKN-CONTEXT token.
The DSM/TC subsystem can return an empty response if an application returns a 
ZSPI-TKN-CONTEXT token to the MEDIASRV process and there are no more 
responses to be returned. The return token ZSPI-TKN-RETCODE in an empty 
response record always has the value ZMCS-ERR-EMPTYRESPONSE.
The DSM/TC subsystem does not allow the application to request a subset of 
response records (that is, DSM/TC does not support the ZSPI-TKN-RESPONSE-TYPE 
token). The DSM/TC subsystem always returns a response for every object—whether 
or not errors or warnings occurred for the object.
Although the DSM/TC subsystem generates responses for all commands, responses 
from some commands must be obtained from fields within an extensible structured 
token. To refer to a field within an extensible structured token:
1. Obtain the entire structured token using SSGET.
2. Refer to the fields of the structure, using the defined field names.
The DSM/TC subsystem supports multiple occurrences of the same token in 
responses for specific commands, and the MEDIASRV process returns multiple 
instances of the same token in responses for these commands.
Error Handling
Nonzero values for the SPI standard token ZSPI-TKN-RETCODE indicate an error. 
When the value of the ZSPI-TKN-RETCODE token is 0, it indicates that the operation 
was successful.
Security
Some commands can only be issued by specific users. If a command is attempted 
from an application but it is not allowed, the MEDIASRV process returns an error. For 
information on which commands are restricted to super-group usage only, see 
Section 5, Commands and Responses.










