SPI Reference Summary

SPI Procedures and Functions
SPI Reference Summary427507-006
2-6
SSGET and SSGETKN Procedures
ZSPI-TKN-COUNT
Use this token code to get the total number of occurrences of a specific token (starting
from a specified index).
This operation returns in count, INT .EXT:ref:1, the total number of occurrences of
token-id. If index is zero or not supplied, counting starts from the current position.
To count all occurrences in the current list, specify an index of 1.
ZSPI-TKN-DEFAULT-SSID
Use this token code to get the default subsystem ID value of the token at the current
position.
Here SSGET or SSGETTKN returns in ssid, INT .EXT:ref:6, the default subsystem ID
value at the current position.
ZSPI-TKN-LEN
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 two bytes required for the length word. The byte-length
returned is token-value[0] + 2.
SSGET ( buffer
SSGETTKN , ZSPI-TKN-COUNT
, [ token-id ] ! i
, [ index ] ! i
, [ count ] ! o
, [ ssid ] ) ! i
SSGET ( buffer
SSGETTKN , ZSPI-TKN-DEFAULT-SSID
, ssid ) ! o
SSGET ( buffer
SSGETTKN , ZSPI-TKN-LEN
, [ token-id ] ! i
, [ index ] ! i
, byte-length ! o
, [ ssid ] ) ! i