Using EMS
Using Programmatic Interfaces
107365 Tandem Computers Incorporated
7–13
You can find the necessary definitions in the ZSPIDEF subvolume; load them from
within your TACL code or create and attach segment files (in the ZEMSSEGF
subvolume) that contain the information.
Follow these steps to generate an EMS event:
1.
Define a message buffer (#DEF)
2.
Initialize the buffer (#EMSINIT)
3.
Store requests in the buffer and send the buffer (#SSPUT, #SSPUTV)
Generating an EMS Event
Use the macro in Figure 7-3,
taclevent
, to generate an event from EMS and,
optionally, set the action flag or critical flag. The syntax is:.
taclevent
urgency
where
urgency
is 1 for no flag, 2 for an action flag, and 3 for a critical flag.
You can use the
dumplog
routine (n Figure 7-2) to display the event log and check
your results.
Figure 7-3. Generating an EMS Event (Page 1 of 3)
?SECTION taclevent MACRO
#FRAME
#PUSH evt_x evt_error req_error req_read req_prompt
#PUSH action_id collector
== Load the files. (If the files do not exist, TACL
== returns an error and exits.)
#LOAD /LOADED evt_x/ $system.zspidef.zemstacl
#LOAD /LOADED evt_x/ $system.zspidef.zspitacl
#LOAD /LOADED evt_x/ $system.zspidef.ztactacl
[#DEF evt_buf STRUCT
BEGIN
BYTE b(1:3000);
END;
]
[#DEF build_evt ROUTINE |BODY|
#FRAME
#PUSH evt_num action emphasis evt_text text_len
SINK [#ARGUMENT /TEXT evt_num/ NUMBER]
SINK [#ARGUMENT /TEXT action/ NUMBER]
SINK [#ARGUMENT /TEXT emphasis/ NUMBER]
SINK [#ARGUMENT /TEXT evt_text/ TEXT ]