EMS Manual
EMS Definitions
EMS Manual—426909-005
14-8
Definitions of EMS Special Token Codes
Definitions of EMS Special Token Codes
These special token codes are defined for use with the EMSGET and EMSGETTKN
procedures to request information.
The normal mechanism to report events is through the WRITEREAD procedure.
However, you can use text messages, as well as EMS event messages, to report
events. Call the WRITE procedure with the text message, as you did in releases prior
to the release of EMS.
If you report an event through a WRITE call to $0, $0 creates the tokenized event
message that goes in the collector log file. The creation time of the message is
reported in the header token ZEMS-TKN-GENTIME. The time when the event occurred
is unavailable, so any time fields associated with the process ID of the message have
the value 0.
Do not call WRITE from a remote system to report an event. If you do, information in
the CPU and PIN tokens is meaningless. However, a WRITEREAD with an EMS event
message from a remote system is perfectly acceptable.
The EMSGET and EMSGETTKN procedures recognize two special tokens that are
equivalent to the old ZEMS-TKN-SENDERID token:
The EMSGET and EMSGETTKN procedures still support the ZEMS-TKN-SENDERID
token, if possible. However, it might not be possible to extract ZEMS-TKN-SENDERID
data from a D-series or later event. For example, the ZEMS-TKN-SENDERID token
cannot contain a D-series PIN number larger than 255.
To get the value of the subject token, call EMSGET again, passing the token code,
subsystem ID, and index returned by the ZEMS-TKN-SUBJECT operation.
For more information about special-operation tokens that are defined for use with event
messages, see the description of the EMSGET procedure in EMSGET and
EMSGETTKN Procedures on page 15-12.
ZEMS-TKN-SENDERID
(shared), passed to EMSGET, gets the process ID, in fname32
format, of the process that reported the event. For more
information, see the Guardian Programmer’s Guide.
ZEMS-TKN-XSENDERID
contains the node number, CPU, and PIN of the sender of
the event.
ZEMS-TKN-XSENDERID-PD
is a variable-length string containing the process
descriptor of the event sender.
ZEMS-TKN-SUBJECT
(shared), passed to EMSGET, gets the token code and
subsystem ID of any subject token in an event message. To
specify which subject token, use the index parameter. The value
of the subject token is not returned.