SPI Programming Manual (G06.24+, H06.03+, J06.03+)
The SPI Procedures
SPI Programming Manual—427506-006
3-19
Special Operations With SSGET and SSGETTKN
ZSPI-TKN-NEXTCODE: Get the Next Different Token Code in 
the Buffer
Use this token code to get the next token code in the buffer that is different from the 
current token code: 
next-token-code
contains the next different token code in the buffer.
occurs
contains the number of contiguous occurrences of next-token-code.
For this operation, 
ssid is an output parameter only; you do not supply any 
information in this token, but merely provide a variable in which SSGET will return the 
subsystem ID that qualifies the token code. If you do not supply a variable for 
ssid, 
and the subsystem ID associated with the next token code is not the same as the 
default subsystem ID, a “missing parameter” error is returned. Therefore, always 
supply a variable for 
ssid when calling SSGET with ZSPI-TKN-NEXTCODE unless, 
for some special reason, you are certain that all tokens the program could encounter 
are qualified by the default subsystem ID. The 
ssid returned always has a version 
field of zero (null).
The 
index parameter has no effect on this operation. If supplied, it must be equal to 
zero. 
SSGET ( buffer
SSGETTKN , ZSPI-TKN-NEXTCODE
 , [ next-token-code ] ! o
 ,
 , [ occurs ] ! o
 , [ ssid ] ) ! o
Note. The special operations ZSPI-TKN-NEXTCODE and ZSPI-TKN-NEXTTOKEN return only 
token codes. In particular, tokens that were added to the buffer by using SSPUT with a token 
map are carried in the buffer with a token code of type ZSPI-TYP-STRUCT. The NEXTCODE 
and NEXTTOKEN operations return this token code, not the token map used with SSPUT.
The best way to determine which token has been returned by NEXTCODE or NEXTTOKEN is 
to extract the token number from the token code and test it. This technique prevents any 
problem that might occur because of a change in the type of an extensible structured token.










