OSI/TS Management Programming Manual
Sample Programs
C–22 056786 Tandem Computers Incorporated
 ! 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 load-filter token in the buffer.
 spi^err := SSPUTTKN(spi^buf, ZEMS^TKN^FILTERFILE,
 filt^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
! ***********************************************************
! * displ^event *
! ***********************************************************
! This procedure displays, at your terminal, the event
! message just retrieved.
PROC displ^event(event^buf);
 INT .EXT event^buf;
BEGIN
 INT(32) etxt^stat;
 INT i;
 ! Generate display text from the event message.
 etxt^stat :=
 EMSTEXT(event^buf,
 EVT^TEXT^BUF,
 evt^text^len, ! displayable line length
 num^evt^lines, ! number of display lines
 actual^len, ! line lengths stored here
 , ! reserved
 , ! indent default
 1); ! console-compatible
 ! Check for EMSTEXT calling errors.
 IF $HIGH (etxt^stat) = 0 and $INT (etxt^stat) <> 0
 THEN CALL DEBUG;
 ! Display the text.
 FOR i := 0 TO num^evt^lines-1 DO
 BEGIN
 IF (actual^len[i] <> -1) THEN
 BEGIN










