OSI/TS Management Programming Manual

Sample Programs
056786 Tandem Computers Incorporated C–21
IF spi^err <> ZSPI^ERR^OK THEN
CALL DEBUG;
IF (ems^err <> 0) THEN
BEGIN
IF (ems^err = ZEMS^ERR^FLT^LOAD) THEN
BEGIN
CALL WRITE(term^file^num, message[1],
message[0]);
return( ems^err );
END
ELSE
CALL DEBUG;
END;
return( spi^err );
END;
?PAGE
! ***********************************************************
! * spi^cmd^set^source *
! ***********************************************************
! This procedure builds an SPI command that directs the
! distributor to use a collector as the source of event
! messages.
INT PROC spi^cmd^set^source;
BEGIN
! Initialize spi^buf for distributor CONTROL command.
spi^err := SSINIT (spi^buf, ZEMS^VAL^BUFLEN,
zems^val^ssid,
ZSPI^VAL^CMDHDR, ZEMS^CMD^CONTROL);
IF spi^err <> ZSPI^ERR^OK THEN
CALL DEBUG;
! Place connect-source-collector token in the buffer.
spi^err := SSPUTTKN(spi^buf, ZEMS^TKN^CONNECT^SRC^COLL,
coll^name);
IF spi^err <> ZSPI^ERR^OK THEN
CALL DEBUG;
! Send the command to the distributor.
spi^err := send^spi^cmd;
RETURN spi^err;
END;
?PAGE
! ***********************************************************
! * spi^cmd^load^filter *
! ***********************************************************
! This procedure builds an SPI command that loads a filter
! into the distributor.
INT PROC spi^cmd^load^filter;
BEGIN