OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
C–30 056785 Tandem Computers Incorporated
--
SSError := SSGetTkn( Spi^Buffer,
zSpi^Tkn^RetCode,
Ems^err,
1 );
IF ( SSError <> zSpi^Err^OK ) THEN
CALL Debug
ELSE IF ( Ems^err <> 0 ) THEN
BEGIN
IF ( Ems^err = zEms^Err^Flt^Load )
OR ( Ems^err = zEms^Err^Flt^Form ) THEN
BEGIN
--
-- Separate out the filter-load error, since it
-- is common to have a typographical error in the
-- filter name.
--
CALL Write( term, message[1], message[0] );
RETURN ( Ems^err );
END
ELSE
CALL Debug;
END; -- if Ems^err <> 0
RETURN ( SSError );
END; -- proc send^spi^cmd
? PAGE "spi^cmd^set^source"
-------------------------------------------------------------
--
-- SPI^Cmd^SET^Source -
--
-- This procedure builds an SPI command that directs the
-- distributor to use an EMS collector as the source of event
-- messages.
--
-- input - Spi^Buffer
-- output - SSError
--
-------------------------------------------------------------
INT PROC spi^cmd^set^source;
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;