Distributed Name Service (DNS) Management Programming Manual
DNS Programming Example, TAL
G–14 46958 Tandem Computers Incorporated
THEN
result := dns^spierr(status);
END;
IF NOT error THEN
!
! Put the INFO NAME parameter in REQUEST buffer.
!
IF (status := ssput(req^buf, param^map, param)) THEN
result := dns^spierr(status);
IF NOT error THEN
!
! Indicate that the name manager should return as many responses
! as will fit in the response buffer.
!
IF (status := ssputtkn(req^buf, zspi^tkn^maxresp, maxresp)) THEN
result := dns^spierr(status);
WHILE NOT (done OR error) DO
BEGIN
!
! Send the request to the name manager.
!
result := dns^send(fno, req^buf, resp^buf, more);
WHILE NOT (error OR
(status := ssgettkn(resp^buf, zspi^tkn^datalist)))
DO
BEGIN
!
! We found (another data list): get RETCODE.
!
IF (status := ssgettkn(resp^buf, zspi^tkn^retcode, retcode)) THEN
result := dns^spierr(status);
IF retcode = zdns^err^nomore THEN
!
! The name manager doesn't have any more responses, so we're
! finished.
!
done := true
ELSE
IF retcode THEN
!
! Some other kind of error.
!