SNAX/APC Management Programming Manual
Programming Example
B–6 111813 Tandem Computers Incorporated
 INT .obj^name; ! the object name of the LU to be
 ! stopped
BEGIN
 INT sserror, ! returned by call on SPI procedure
 return^token; ! the value of the return token
 ! Initialize the command buffer
 CALL build^cmd( zcom^cmd^stop, zcom^obj^lu );
 ! Put the object-name token in the buffer
 sserror := SSPUTTKN( buffer, zcom^tkn^objname, obj^name );
 IF sserror THEN
 CALL handle^spi^error( sserror ); ! error on the call
 return^token := call^scp;
 IF return^token <> zspi^err^ok THEN ! an error occurred
 ! Handle the possible errors for the STOP LU command.
END; ! of stop^lu
?PAGE "PROC: ALTER^LU"
! **************************************************************
! * alter^lu *
! **************************************************************
PROC alter^lu( obj^name );
 INT .obj^name; ! the object name of the lu whose
 ! attributes are to be altered
BEGIN
 INT sserror, ! returned by call on SPI procedure
 return^token; ! the value of the return token
 INT(32) tkn^code := zapc^tkn^sess^lim;
 INT tkn^value := 512;
 ! Initialize the command buffer.
 CALL build^cmd( zcom^cmd^alter, zcom^obj^lu );
 ! Put the object-name token in the buffer.
 sserror := SSPUTTKN( buffer, zcom^tkn^objname, obj^name );
 IF sserror THEN
 CALL handle^spi^error( sserror ); ! error on the call
 ! Modify the session limit attribute.
 sserror := SSPUTTKN( buffer, tkn^code, tkn^value );
 IF sserror THEN
 CALL handle^spi^error( sserror ); ! error on the call
 return^token := call^scp;
 IF return^token <> zspi^err^ok THEN ! an error occurred
 BEGIN
 ! Handle the possible errors for the ALTER LU command.
 END;










