OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
C–38 056785 Tandem Computers Incorporated
-- (must open the #ZSPI subdevice).
--
Distr^Name [4] ':=' "#ZSPI ";
CALL Open( Distr^name, Distr^Fn );
IF <> THEN
BEGIN
CALL FileInfo ( Distr^Fn, Error );
CALL Debug;
GOTO Exit;
END;
--
-- Tell distributor to use collector log files as
-- the source of event messages.
--
error := spi^cmd^set^source;
IF error THEN GOTO Exit;
--
-- Load filter into distributor.
--
error := spi^cmd^load^filter;
IF error THEN GOTO Exit;
--
-- Specify the position within the log files where
-- event-message retrieval will begin: four hours ago.
-- (60 min) * (60 sec) * (4 hours) = 14,400 sec
-- = 14,400,000,000 microsec.
--
julian^time^stamp := JulianTimeStamp - 14400000000F;
error := spi^cmd^set^position( julian^time^stamp );
IF error THEN GOTO Exit;
--
-- Retrieve and display event messages.
--
CALL getevent^loop;
Exit:
CALL Close( Distr^Fn );
CALL Close( term );
END; -- proc dist^intfc (main)