SPI Programming Manual (G06.24+, H06.03+, J06.03+)
The SPI Procedures
SPI Programming Manual—427506-006
3-18
Special Operations With SSGET and SSGETTKN
ZSPI-TKN-LEN: Get the Length of a Token Value
Use this token code to get the byte length of a specific token value: 
This operation returns in 
byte-length, INT .EXT:ref:1, the size of the buffer needed 
to contain the specified occurrence of the token value. For variable-length token 
values, this includes the 2 bytes required for the length word, as shown in Figure 2-2
on page 2-6: the 
byte-length returned is token-value[0] + 2.
If 
token-id is either omitted or equal to ZSPI-VAL-NULL-TOKENCODE and index is 
either omitted or zero, then SSGET or SSGETTKN returns the length of the current 
token.
If 
token-id is a token map, this operation returns the length of the structure 
corresponding to that token map; the actual value in the buffer can be longer or shorter 
than this length. To get the actual length of the token value in the buffer, call SSGET 
with ZSPI-TKN-LEN and a token code made up of ZSPI-TYP-STRUCT and the token 
number from the token map. This operation returns the length of the structure value, 
including 2 bytes for the length field. Then subtract 2 from this value to get the length of 
the value that starts at the address obtained by ZSPI-TKN-ADDR with the token map.
ZSPI-TKN-MAX-FIELD-VERSION: Retrieve Maximum Version 
of Structure Fields
Call SSGET or SSGETTKN with this token code to retrieve the maximum field version 
from the corresponding header token. If you specify an 
index parameter, it must have 
a value of 0 or 1.
ZSPI-TKN-MAXRESP: Retrieve Maximum Responses Setting
Call SSGET or SSGETTKN with this token code to retrieve the setting of the maximum 
responses parameter from the corresponding header token. If you specify an 
index 
parameter, it must have a value of 0 or 1.
SSGET ( buffer
SSGETTKN , ZSPI-TKN-LEN
 , [ token-id ] ! i
 , [ index ] ! i
 , byte-length ! o
 , [ ssid ] ) ! i










