Expand Management Programming Manual

COMMANDS AND RESPONSES
Examples of Commands and Responses
! ***************************************************************
! * alter^line *
! ***************************************************************
PROC alter^line(obj^name);
INT .obj^name; ! object name of line whose
! attributes are to be altered
BEGIN
INT spi^err, ! returned by call on SPI procedure
return^token; ! value of return token
INT .zexp^map^alter^line^req[0:zexp^map^alter^line^wln-1]
:= zexp^map^alter^line;
INT .alter^line^value(zexp^ddl^alter^line^def);
! Initialize the command buffer
CALL build^cmd(zcom^cmd^alter, zcom^obj^line);
! Put the object-name token in the buffer
spi^err := SSPUTTKN(exp^buf, zcom^tkn^objname, obj^name);
IF spi^err THEN
CALL handle^spi^error(spi^err); ! error on the call
@alter^line^value := @tkn^value;
! Initialize the fields of the extensible structured token
! ZEXP^MAP^ALTER^LINE to null values
spi^err := SSNULL(zexp^map^alter^line^req, alter^line^value);
IF spi^err THEN
CALL handle^spi^error(spi^err); ! error on the call
! Modify the fields that correspond to the attributes
! to be altered
alter^line^value.zretries := 6;
alter^line^value.zsyncs := 4;
! Put the token in the command buffer
spi^err := SSPUT(exp^buf, zexp^map^alter^line^req,
alter^line^value);
IF spi^err THEN
CALL handle^spi^error(spi^err); ! error on the call
return^token := call^scp;
IF return^token <> zcom^err^ok THEN ! an error occurred
! Handle the possible errors for the ALTER LINE command
END; ! of alter^line
7-132