Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, TAL
46958 Tandem Computers Incorporated G–17
 !
 ! Responses are different; set AMBIGUOUS and
 ! signal that we are finished.
 !
 done := true;
 ambiguous := true;
 END
 ELSE
 ELSE
 BEGIN
 !
 ! This is our first response; move it into caller's
 ! INFO NAME response.
 !
 response ':=' candidate FOR 1 ELEMENTS;
 have^response := true;
 END
 END;
 !
 ! Exit the current data list.
 !
 IF (status := ssgettkn(resp^buf, zspi^tkn^endlist)) THEN
 result := dns^spierr(status);
 END;
 END;
 !
 ! Either we've found an error or we got an error looking for the
 ! next data list. In the latter case, be sure that the error was
 ! ZSPI^ERR^MISTKN.
 !
 IF NOT (done OR error OR status = zspi^err^mistkn) THEN
 result := dns^spierr(status);
 !
 ! If we're not finished, see if the name manager has more responses
 ! for us.
 !
 IF NOT (done OR error) THEN
 !
 ! Is there a context token in the response?
 !
 IF (status := ssgettkn(resp^buf, zspi^tkn^context, , 1)) THEN
 IF status = zspi^err^mistkn THEN
 !
 ! No; we're finished.
 !










