OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
C–22 056785 Tandem Computers Incorporated
Example in TAL The following pages give the source code for the event-retrieval program in TAL.
-------------------------------------------------------------
--
-- File: EXEMST1
--
-- This program demonstrates how to retrieve an event
-- message produced by the OSI/AS subsystem and handle it
-- appropriately. It does the following:
--
-- - Starts and opens an EMS consumer distributor
--
-- - Prompts you at your terminal for a filter file name
--
-- - Issues EMS CONTROL commands to
-- -- Connect the collector $0
-- -- Load a filter file
--
-- - Performs the following steps in a loop:
-- -- Issues an EMS GETEVENT command
-- -- Displays an event message at your terminal
--
-- The program waits for new event messages, generated within
-- the last 4 hours, that pass the specified filter, and
-- displays them as they arrive. After displaying all the
-- event messages, the program exits to the TACL prompt.
--
-- To terminate the program, press the BREAK key
-- and type STOP.
--
-------------------------------------------------------------
? Inspect, Symbols
? NoMap, NoCode
? ExtendStack 4 -- To ensure enough stack space for EMSTEXT
--
-- Note: The following SOURCE statements assume that before
-- compilation, a VOLUME or ASSIGN command has been entered
-- at the TACL command interpreter to set the correct volume
-- and subvolume for the SPI definition files.
--
-- SPI TAL definitions
? NoList, Source zSpiTAL
? List
-- EMS TAL definitions
? NoList, Source zEmsTAL
? List
-- OSI/AS TAL definitions
? NoList, Source zOsiTAL
? List
STRUCT Startup^msg^def (*);
BEGIN
INT msgcode;