OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
056785 Tandem Computers Incorporated C–37
 END; -- while
END; -- proc getevent^loop;
? PAGE "dist^intfc"
-------------------------------------------------------------
--
-- zOsi^EMS^Example - Interface to an EMS distributor
--
-- This MAIN procedure starts an EMS consumer distributor
-- and calls procedures that use SPI commands to connect a
-- source collector, to load a filter, and to position the
-- distributor within the log files. Then the procedure
-- calls GetEvent^LOOP to retrieve and process event
-- messages.
--
-------------------------------------------------------------
PROC zOsi^EMS^Example MAIN;
BEGIN
 FIXED julian^time^stamp;
 INT error;
 --
 -- Initialize the subsystem IDs.
 --
 zEms^Val^ssid.z^Owner ':=' [ zSpi^Val^Tandem ];
 zEms^Val^ssid.z^number := zSpi^SSN^zEms;
 zEms^Val^ssid.z^version := zEms^Val^Version;
 --
 -- Get terminal name and open terminal.
 --
 CALL MyTerm( term^name );
 CALL Open( term^name, term );
 --
 -- Process the startup sequence.
 --
 error := Startup ( Startup^Msg );
 IF error THEN GOTO Exit;
 --
 -- Start and initialize the distributor process.
 --
 error := Initialize^Distributor;
 IF error THEN GOTO Exit;
 --
 -- Get filter name from terminal.
 --
 CALL get^filter^name;
 --
 -- Open the distributor for SPI commands and responses










