Distributed Name Service (DNS) Management Programming Manual

DNS Programming Example, TACL
F–22 46958 Tandem Computers Incorporated
#OUTPUT *** Server Open Error [l^status] : [dns^manager]
#SET dns^send^error NOTOPEN
#RAISE dns_exception
]
==
== Initialize GETVERSION request.
==
#SET l^status [#SSINIT l^request^buf [zdns^val^ssid]
[zspi^cmd^getversion]] dns^check^status SSINIT
==
== Send GETVERSION request to the name manager.
==
dns^send l^request^buf l^response^buf
==
== Get name manager version.
==
#SET l^status [dns^ssget l^response^buf
zspi^tkn^server^version
dns^version]
dns^check^status SSGET
==
== Get and print the server banner.
==
#SET l^status [dns^ssget l^response^buf
zspi^tkn^server^banner
l^banner]
dns^check^status SSGET
#OUTPUT [l^banner]
#UNFRAME
?SECTION dns^send routine
==
== Sends a request to the DNS name manager and waits for a response:
==
== DNS^SEND <request-variable> <response-variable> [ <continuation> ]
==
== where:
==
== <request-variable> STRUCT variable containing the DNS SPI request.
== <response-variable> STRUCT variable where the DNS SPI response is
== to be placed.