Distributed Name Service (DNS) Management Programming Manual

DNS Programming Example, TACL
46958 Tandem Computers Incorporated F–19
dns^lookup^found
|ELSE|
==
== No; see if it's an alias whose referent matches.
==
[#IF (l^candidate:zdnstype = zdns^obj^alias) |THEN|
[#IF [dns^lookup^type l^candidate:zreftype [l^types]] |THEN|
==
== Yes; resolve the alias.
==
dns^resolve^alias
]
]
]
==
== No more responses from the name manager; we're finished.
==
|28| {zdns^err^nomore}
#SET l^done -1
|OTHERWISE|
==
== Some sort of error.
==
dns^err l^retcode
]
==
== Exit this data list.
==
#SET l^status [dns^ssget l^response^buf zspi^tkn^endlist]
dns^check^status SSGET
?SECTION dns^lookup^found MACRO
==
== If we already have a response, the name is ambiguous.
==
[#IF l^have^response |THEN|
dns^ambiguous^name [l^name]
]
==
== Remember that we have a response.
==
#SET l^have^response -1
==
== Save this response.
==