EMS Manual

EMS Procedures
EMS Manual426909-005
15-12
EMSGET and EMSGETTKN Procedures
buffer on that procedure call is in an extended form that includes the ssid that you
specified.
EMSGET and EMSGETTKN Procedures
The EMSGET and EMSGETTKN procedures extract tokens and related information
from an event-message buffer. The two procedures produce the same results and are
identical except for:
The type of the token-id parameter—EMSGET passes token-id by reference
and EMSGETTKN passes it by value)
The consequent fact that EMSGETTKN cannot be used with a token map.
EMSGET and EMSGETTKN are similar in operation to SSGET and SSGETTKN.
In TAL programs, use EMSGETTKN when supplying a token code for the token-id
parameter. This eliminates the need to store the token code in a temporary variable
before passing it to EMSGET. You must use EMSGET when supplying a token map.
In COBOL85 programs, use EMSGET through ENTER TAL.
status returned value
INT
is one of these SPI error numbers:
0 No error
-1 Invalid buffer format
-2 Illegal parameter value
-3 Missing parameter
-4 Illegal parameter address
-5 Token too large for buffer
-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
-30 Buffer length is larger than
ZEMS-VAL-EVT-BUFLEN
buffer input, output
INT .EXT:ref:*
{ status := } { EMSGET } ( buffer ! i/o
{ CALL } { EMSGETTKN } , token-id ! i
, [ token-value ] ! i/o
, [ index ] ! i
, [ count ] ! i/o
, [ ssid ] ) ! i/o