SPI Programming Manual (G06.24+, H06.03+, J06.03+)
The SPI Procedures
SPI Programming Manual—427506-006
3-11
Considerations
operation sets the current-token pointer to the beginning of the buffer following the 
header.
ZSPI-TKN-RESET-BUFFER: Reset the Buffer
Use this token code before extracting tokens from an SPI buffer received (in either a 
command or a response) from another process. The calling sequence is:
This operation:
•
Resets the maximum buffer length to maxlen bytes
•
Clears the last-error information to zero (equivalent to the action of ZSPI-TKN-
CLEARERR)
•
Resets the current-token pointer to the beginning of the buffer (equivalent to the 
action of ZSPI-TKN-INITIAL-POSITION with ZSPI-VAL-INITIAL-BUFFER)
If 
maxlen is less than the actual number of bytes used in the buffer, as given in the 
header token ZSPI-TKN-USEDLEN, the procedure returns ZSPI-ERR-NOSPACE. 
However, the procedure still resets the maximum buffer length in the SPI message 
header, and subsequent SPI calls for that buffer fail with ZSPI-ERR-INVBUF.
ZSPI-TKN-SERVER-VERSION: Set Server Version Header 
Token
Use this token code to set the header token containing the release version of the 
server. For 
token-value, supply an unsigned integer representing the appropriate 
release version. For example, if the server is a NonStop Kernel subsystem of version 
G06, 
token-value should be the unsigned integer with the ASCII character 
G 
in the 
left byte and “06” in the right byte, or 18182.
Considerations
•
The token-value parameter is optional if the token length specified by token-
id is zero (for instance, if token-id is ZSPI-TKN-DATALIST, ZSPI-TKN-
ERRLIST, ZSPI-TKN-ENDLIST, or ZSPI-TKN-LIST). Otherwise, the 
token-
value parameter is required.
•
Specifying a count parameter greater than one is equivalent to calling SSPUT or 
SSPUTTKN 
count number of times in succession without specifying that 
parameter (but updating 
token-value before each call).
•
If count is greater than one and the token is of variable length, the values in the 
token-value array must be word-aligned.
SSPUT ( buffer
SSPUTTKN , ZSPI-TKN-RESET-BUFFER
 , maxlen ) ! i










