DSM/Tape Catalog Management Programming Manual
SPI Programming Considerations
DSM/Tape Catalog Management Programming Manual—520481-003
3-6
Components of a Command Buffer
Components of a Command Buffer
A command buffer consists of an SPI message header and zero or more tokens. 
These tokens in the command buffer can be parameter tokens, a maximum-response 
token, or a context token.
SPI Message Header
The header for a SPI command message indicates that the buffer is for a SPI 
command. The buffer header contains the command number and object-type number 
for the command. The buffer header also includes positioning information used by 
SSGET and SSPUT.
Parameter Tokens
You can supply parameter tokens in the command buffer to provide parameters for a 
command. For example, to issue an ADD TAPEVOLUME command, you must include 
a ZMCS-TKN-TAPEVOLUME token that contains the name of a tape volume to be 
added to the DSM/TC catalog. Because many of the programmatic commands for 
MEDIASRV require parameter tokens that are extensible structured tokens, you also 
must include the ZMCS-MAP-ADD-TAPEVOLUME token if you issued the ADD 
TAPEVOLUME command.
Maximum-Response Token
The command buffer can also contain the ZSPI-TKN-MAXRESP token, which specifies 
the maximum number of response records the requester can accept in a single 
response buffer received from the MEDIASRV process.
Context Token
The command buffer contains a context token for some commands. The reply to the 
command contains the ZSPI-TKN-CONTEXT token if there are more objects in the set 
to be processed. To continue the command, the application program copies the ZSPI-
TKN-CONTEXT token to a duplicate of the original command message and resubmits 
the command buffer to the MEDIASRV process.
Components of a Response Buffer
The response records in a reply (response) buffer include all of the information that 
results from the action of a single command on a single object, plus error or warning 
information about the command itself: the message header, response tokens, the 
context token, the return token, and error lists.
Message Header
The message header for a response buffer contains the command number and object 
type number that resulted in the reply, the DSM/TC subsystem ID, and so on.










