Expand Management Programming Manual
 COMMANDS AND RESPONSES
 Examples of Commands and Responses
 ! Initialize the command buffer
 CALL build^cmd(zcom^cmd^info, zcom^obj^process);
 ! Put the object-name token ("$NCP") in the buffer
 i^ncp^name[0] := 4; ! lenght of the string
 s^ncp^name[2] ':=' ["$NCP"]; ! value of the string
 spi^err := SSPUTTKN(exp^buf, zcom^tkn^objname, i^ncp^name);
 IF spi^err THEN
 CALL handle^spi^error(spi^err); ! error on the call
 ! Put the NCP option token in the buffer;
 ! select both network map and path map information
 ncp^maps^val := zexp^val^ncp^maps;
 spi^err := SSPUTTKN(exp^buf, zexp^tkn^info^ncp^opt,
 ncp^maps^val);
 IF spi^err THEN
 CALL handle^spi^error(spi^err); ! error on the call
 ! Put the called-system token in the buffer
 spi^err := SSPUTTKN(exp^buf, zexp^tkn^called^sys, called^sys);
 IF spi^err THEN
 CALL handle^spi^error(spi^err); ! error on the call
 ! Put the selected-system token in the buffer
 spi^err := SSPUTTKN(exp^buf, zexp^tkn^sel^sys, sel^sys);
 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
 BEGIN
 ! Handle the possible errors for the INFO PROCESS ($NCP)
 ! command
 RETURN;
 END;
 ! Get the value of the NETMAP extensible structured token
 spi^err := SSGET(exp^buf,zexp^map^info^ncp^netmap^rsp,
 tkn^value, 1);
 IF spi^err THEN
 CALL handle^spi^error(spi^err); ! error on the call
 ! Make the information accessible
 @info^ncp^netmap^value := @tkn^value;
 ! Get the value of the PATHMAP extensible structured token
 spi^err := SSGET(exp^buf,zexp^map^info^ncp^pathmap^rsp,
 tkn^value, 1);
 IF spi^err THEN
 CALL handle^spi^error(spi^err); ! error on the call
 7-130










