SPI Programming Manual (G06.24+, H06.03+, J06.03+)

The SPI Procedures
SPI Programming Manual427506-006
3-21
Special Operations With SSGET and SSGETTKN
ZSPI-TKN-OFFSET: Retrieve the Byte Offset of a Token
Value
Use this token code to get the byte offset of a specific token value:
This operation returns, in
byte-offset, INT .EXT:ref:1, the byte offset from the start
of the buffer to the value associated with the specified token code and index. (For
variable-length values, the token value begins with the length word; the offset given is
the offset to that length word.)
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 offset of the current
occurrence of the current token.
ZSPI-TKN-POSITION: Retrieve Current-Token Position
Call SSGET or SSGETTKN with this token code to retrieve the pointer to the current
token. The value returned is a four-word position descriptor, INT .EXT:ref:4, that you
can later use to reset the position with the SSPUT or SSPUTTKN special operation
ZSPI-TKN-POSITION. If you specify an
index parameter, it must have a value of 0 or
1.
ZSPI-TKN-SERVER-VERSION: Retrieve Server Version
Call SSGET or SSGETTKN with this token code to retrieve the server version from the
corresponding header token. If you specify an
index parameter, it must have a value
of 0 or 1.
ZSPI-TKN-SSID: Retrieve SSID Used When Buffer Was
Initialized
Call SSGET or SSGETTKN with this token code to retrieve the default SSID from the
corresponding header token. If you specify an
index parameter, it must have a value
of 0 or 1.
ZSPI-TKN-USEDLEN: Retrieve Used Length of Buffer
Call SSGET or SSGETTKN with this token code to retrieve the length of the used
portion of the buffer from the corresponding header token. If you specify an
index
parameter, it must have a value of 0 or 1.
SSGET ( bufferSSGETTKN
, ZSPI-TKN-OFFSET
, [ token-id ] ! i
, [ index ] ! i
, byte-offset ! o
, [ ssid ] ) ! i