Distributed Name Service (DNS) Management Programming Manual
INFO NAME Command
Using DNS in Programs: The DNS Commands
46958 Tandem Computers Incorporated 5–161
Operational Notes
The uniqueness of the name supplied in ZNAME is determined by the presence of
multiple responses and/or a context token in the response buffer.
For example, if ZSPI-TKN-MAXRESP is not supplied, ZNAME is supplied as an X,
and ZDEFNODE is supplied as “*”; then, if X is found and is unique, the response
buffer contains ZDNS-MAP-INFO-BR and ZSPI-TKN-RETCODE. If X is found
but is not unique, the response buffer also contains ZSPI-TKN-CONTEXT.
On the initial request, if the name is not found in the DNS database, the response
buffer contains ZSPI-TKN-RETCODE = ZDNS-ERR-NOTFOUND, and the error
list points to ZNAME.
If both ZNAME and ZDEFNODE are supplied as “*”, information about all names
known to the local system is returned.
The ZDNS-TKN-DISPLAYNAME token is a variable-length-string, simple token
that contains the name in a form suitable for presentation to human operators; it is
returned as a convenience to requesters if the value of ZDNS-MAP-INFO-NAME-
BR.ZDNSTYPE is not supported by the requester. The token is only returned
when the value of ZDNSTYPE is not defined at the requester’s version.
For example, suppose version F00 of DNS defines ZDNS-OBJ-FRAMITZ = 15, and
F is the name of a FRAMITZ. A requester issues an INFO NAME F command and
receives a ZDNS-MAP-INFO-NAME-BR response. The requester cannot properly
decode the values of the ZDNS-MAP-INFO-NAME-BR structured token since to
do so requires knowledge of the FRAMITZ DNS object type. This is particularly
troublesome for programs like DNSCOM that interact with human operators since
such programs should be able to display the name properly for the operator. The
ZDNS-TKN-DISPLAYNAME token solves this problem.
The requester should be coded something like the following:
CASE info^name^br.zdnstype - zdns^obj^alias OF
BEGIN
!2!
handle ZDNS-OBJ-ALIAS
response
!3!
handle ZDNS-OBJ-ATYPE
response
OTHERWISE
BEGIN
IF NOT ssget(buffer, zdns^tkn^displayname, dname, 1)
THEN
BEGIN
format a suitable response to human operator
END
ELSE
error
;
END;