NET/MASTER Network Control Language (NCL) Programmer's Guide

Sending a Message to EMSPROC
Developing System-Level NCL Procedures
17–20 106160 Tandem Computers Incorporated
Sending a Message to
EMSPROC
You can use two verbs to send a message to EMSPROC for testing: EMSALERT and
EMSSEND. The difference between these verbs lies in the path each uses to send the
message and the resulting structure of the message when it arrives at EMSPROC.
The EMSALERT verb generates an event message from an NCL procedure and sends
it directly to EMSPROC (if EMSPROC is active): otherwise to all users who are
entitled to receive messages from EMSPROC. The EMSSEND verb generates an event
message from an NCL procedure and sends it to the EMS event collector (if the event
collector interface is active): the event distributor then forwards the message through
the EMS interface to NonStop NET/MASTER MS and EMSPROC (if EMSPROC is
active). (The default EMS event collector is $0, and the event collector interface is
started and stopped using the EMSCOLL command.)
In each case, the message is sent in a structure that Mapping Services can understand
and that the EMSREAD, INTREAD, LOGREAD, and MSGREAD verbs can interpret
(when the structure is placed into an MDO variable) by using the map $MSG. See
Section 10, “Working With Mapping Services,” for more information on Mapping
Services and MDO variables. See Section 11, “Standard and User-Defined Maps,” for
more information on the map $MSG.
This subsection explains how to send a message directly to EMSPROC using the
EMSALERT verb, how to send a message through the EMS interface to EMSPROC
using the EMSSEND verb, and how to identify messages from remote systems.
Sending a Message Directly
to EMSPROC
A message sent using the EMSALERT verb, because it does not go through the EMS
event collector, arrives at EMSPROC without any SPI tokens added to those supplied
by the creator of the message. You can construct a message using EMSALERT in two
ways: by specifying the TEXT, SSID, and EVENTNUM operands (all three operands
must be specified) or by constructing an MDO variable and specifying the text,
subsystem identifier, and event number (and any other elements) in a series of
assignment statements.
The following example sends a message using the TEXT, SSID, and EVENTNUM
operands:
EMSALERT TEXT=ABC SSID=TANDEM.NNM.D30 EVENTNUM=9999
The following table summarizes the contents of the message when it arrives at
EMSPROC and is read by the EMSREAD verb:
Token Value
&$EMS.TEXT NNM9999 ABC
&$EMS.SOURCE Varies.
&$EMS.SPI.TANDEM.ZEMS_TKN_TEXT ABC
&$EMS.SPI.TANDEM.ZSPI_TKN_SSID TANDEM.NNM.D30
&$EMS.SPI.TANDEM.ZEMS_TKN_EVENTNUMBER.# 9999
&$EMS.SPI.TANDEM.ZEMS_TKN_SUBJECT_MARK TANDEM.ZEMS_TKN_TEXT{1}