TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-141
#EMSGET Built-In Function
#EMSGET Built-In Function
Use #EMSGET to retrieve binary token values from an SPI buffer, convert them to
external representation, and make that external representation accessible in the result
of the function. #EMSGET invokes the EMSGET operating system procedure.
You cannot use #EMSGET to extract values of extensible structured tokens using a
token map or using a token code of type ZSPI^TDT^STRUCT. Instead, use
#EMSGETV.
option
is any of these:
COUNT count
is the maximum number of token values to be returned. This specifies that the
token value returned is an array of count elements, each of which is described
by token-code. If you omit count, it defaults to 1.
If count is greater than 1, #EMSGET continues searching until it either satisfies
the requested count or reaches the end of the buffer or list.
If count is less than 1, an error occurs.
INDEX index
is the specific occurrence of token-code, starting from the beginning of the
buffer or list (an index of 1 gets the first occurrence of that token code, an
index of 2, the second, and so on).
If you omit this option or if index = 0, #EMSGET returns the next occurrence of
the token code after the current position, and resets the current position to that
of the token value returned. If you want to search from the beginning of the
buffer, you must supply a nonzero index or else have previously reset the initial
position with #SSPUT(V) using ZSPI^TKN^INITIAL^POSITION or
ZSPI^TKN^RESET^BUFFER.
If index is less than zero, an error occurs.
SSID ssid
is a subsystem ID that qualifies the token code; if omitted or zero (0.0.0), it
defaults to the subsystem ID of the current list or, if the current position is not in
a list, to the subsystem ID specified in the SPI message header. The version
field of this parameter is not used when searching the buffer.
#EMSGET [ / option [ , option ] ... / ] buffer-var get-op