EMS Manual
EMS Procedures
EMS Manual—426909-005
15-13
EMSGET and EMSGETTKN Procedures
is the SPI buffer from which information is to be extracted.
token-id input
INT .EXT:ref:* (EMSGET)
INT(32):value (EMSGETTKN)
is a token code (EMSGETTKN) or else a pointer (EMSGET) to a token code or
token map. This parameter normally identifies the token to be retrieved. If the
token-id is one of the SPI standard token codes indicating a special operation,
the interpretation of the token-value, count, and index parameters can vary
from the descriptions here. For more information, see Special Operations for
EMSGET and EMSGETTKN on page 15-15.
If token-id is a token that marks the beginning of a list (ZSPI^TKN^DATALIST,
ZSPI^TKN^ERRLIST, or ZSPI^TKN^LIST), EMSGET or EMSGETTKN selects the
list so that subsequent calls can retrieve tokens within the list.
token-value input, output
STRING .EXT:ref:*
is normally the variable in which the requested token value is to be returned. For
control and positioning operations, token-value can be used as an input
parameter. Its data representation depends on the token-type field of the token-
id.
index input
INT:value
if greater than zero, specifies an absolute index for token-id, starting from the
beginning of the buffer or list. That is, an index of 1 gets the first occurrence of
that token code; an index of 2 gets the second occurrence; and so on.
if zero or not supplied, directs EMSGET or EMSGETTKN to return the next
occurrence of the token code after the current position in the buffer. For example, if
the token occurred 5 times, calling EMSGET or EMSGETTKN once with an index
of 1 and 4 times with index 0 would return all 5 occurrences.
if less than zero, returns an error.
EMSGET then resets the current position to that of the token value returned.