OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
C–32 056785 Tandem Computers Incorporated
-- Send the command to the distributor.
--
SSError := send^spi^cmd;
RETURN SSError;
END; -- proc spi^cmd^load^filter
? PAGE "spi^cmd^set^position"
-------------------------------------------------------------
--
-- SPI^Cmd^SET^POSITION -
--
-- This procedure builds an SPI command that sets the
-- position within the log file at which the distributor
-- will start to retrieve event messages. The calling
-- procedure specifies the position by the time parameter,
-- which is in Julian timestamp format.
--
-- input - time to start event retrieval
-- output - SSError
--
-------------------------------------------------------------
INT PROC spi^cmd^set^position( time );
FIXED time;
BEGIN
--
-- Initialize Spi^Buffer for distributor CONTROL command.
--
SSError := SSInit( Spi^Buffer,
zEms^Val^BufLen,
zEms^Val^ssid,
zSpi^Val^CmdHdr,
zEms^Cmd^Control );
IF ( SSError <> zSpi^Err^OK ) THEN
CALL Debug;
--
-- The time token directs the distributor to position
-- the log file at messages generated four hours ago.
--
SSError := SSPutTkn( Spi^Buffer,
zEms^Tkn^GMTTime,
time );
IF ( SSError <> zSpi^Err^OK ) THEN
CALL Debug;
--
-- Send the command to the distributor.
--
SSError := send^spi^cmd;
RETURN SSError;