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

SPI Programming in TACL
SPI Programming Manual427506-006
8-25
#SSGETV
result-var
is the name of the writable STRUCT in which #SSGETV is to store the result. The
original contents of the STRUCT are lost.
If the status code in the expansion is 0 (no error), the result stored in the STRUCT
is:
If you specified token-id, the result is the value of the token.
If you specified ZSPI^TKN^COUNT c-token-id, the result is an INT giving
the total number of occurrences of the token specified by the token code or
token map
c-token-id, starting at index.
If you specified ZSPI^TKN^LEN l-token-id, the result is an INT giving the
length of the token specified by the token code or token map
l-token-id.
If you specified ZSPI^TKN^NEXTCODE, the result is an INT2, an INT, and an
SSID giving the next token code that is different from the current token code,
the number of contiguous occurrences of that token code, and the subsystem
ID.
If you specified ZSPI^TKN^NEXTTOKEN, the result is an INT2 and an SSID
giving the next token code (regardless of whether it is different from the current
token code), followed by the subsystem ID.
If you specified ZSPI^TKN^OFFSET o-token-id, the result is an INT2 giving
the byte offset of the token specified by the token code or token map
o-
token-id.
To extract individual fields of the token code or the subsystem ID returned by
#SSGETV with the ZSPI^TKN^NEXTCODE or ZSPI^TKN^NEXTTOKEN option,
see the example at the end of Considerations
on page 8-26.
Expansion
#SSGETV expands to a numeric status code indicating the outcome of the operation.
This status code has one of these values:
0 No error
-1 Invalid buffer format
-2 Illegal parameter value
-3 Missing parameter
-4 Illegal parameter address
-5 Buffer full
-6 Invalid checksum
-7 Internal error
-8 Token not found
-9 Illegal token code or map
-10 Invalid subsystem ID
-11 Operation not supported
-12 Insufficient stack space