TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-373
#SSGET Built-In Function
The index parameter has no effect on this operation, but if you supply it, it must
be zero.
ZSPI^TKN^NEXTTOKEN
directs #SSGET to return the very next token code, followed by the subsystem
ID. The subsystem ID returned always has a version field of zero (null).
This operation differs from ZSPI^TKN^NEXTCODE in that it always returns the
token code of the next token, whether it is the same as that of the current
token or different, and whether the token is within a list or not. The operation
returns multiple occurrences of the same token code in the same order as they
were added to the buffer with #SSPUT(V).
The index and count parameters have no effect on this operation, but if you
use index, it must be zero; count is always returned as 1 in this operation.
ZSPI^TKN^OFFSET o-token-id
directs #SSGET to return the byte offset of the token specified by the token
code or token map o-token-id. The value returned is the 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 you omit this option or if o-token-id is equal to
ZSPI^VAL^NULL^TOKENCODE, and index is omitted or zero, #SSGET
returns the length of the current occurrence of the current token.
Note that you must supply appropriate token code definitions. TACL merely
keys off the numeric token codes for the special operations.
TACL supports the special semantics for only those SPI special token codes
shown; any other token codes are assumed to adhere to standard semantics.
Result
#SSGET returns a numeric status code indicating the outcome of the SSGET
procedure. If the status code is zero (no error), it is followed by a space and a space-
separated list of the relevant SSGET results in the TACL external representation, as
follows:
•
If you specify token-code, the number of token values returned, followed by a
space-separated list of those values in external form; variable-length token values
Note. The special operations ZSPI^TKN^NEXTCODE and ZSPI^TKN^NEXTTOKEN
return only token codes. In particular, note that tokens added to the buffer using
#SSPUTV with a token map are carried in the buffer with a token code of type
ZSPI^TYP^STRUCT. The NEXTCODE and NEXTTOKEN operations return that token
code, not the token map used with #SSPUTV.