Distributed Name Service (DNS) Management Programming Manual

Appendix G DNS Programming Example,
TAL
46958 Tandem Computers Incorporated G–1
?SOURCE COPYTAL
?DATAPAGES 64
NAME dns^example;
?NOLIST
BLOCK zdnstal;
?SOURCE ZDNSTAL
END BLOCK;
BLOCK zspital;
?SOURCE ZSPITAL(
?ZSPI^DDL^SSID
?ZSPI^DDL^TOKENCODE
?ZSPI^DDL^ERROR
?ZSPI^DDL^PARM^ERR
?CONSTANTS
?)
END BLOCK;
?LIST
?PAGE "DNS DATA DECLARATIONS"
BLOCK dns;
! Literals for use in constructing a type mask parameter to
! the DNS^LOOKUP procedure.
LITERAL
dns^alias^mask = %20000000000d '>>' zdns^obj^alias
, dns^atype^mask = %20000000000d '>>' zdns^obj^atype
, dns^comp^mask = %20000000000d '>>' zdns^obj^comp
, dns^ctype^mask = %20000000000d '>>' zdns^obj^ctype
, dns^dom^mask = %20000000000d '>>' zdns^obj^dom
, dns^group^mask = %20000000000d '>>' zdns^obj^group
, dns^ss^mask = %20000000000d '>>' zdns^obj^ss
, dns^ssmgr^mask = %20000000000d '>>' zdns^obj^ssmgr
, dns^ssobj^mask = %20000000000d '>>' zdns^obj^ssobj
, dns^sstype^mask= %20000000000d '>>' zdns^obj^sstype
;
!
! The sample procedures which follow all have type INT(32). The
! high-order word of the value that they return indicates the type
! of error as follows:
!
LITERAL
dns^et^ok = 0
, dns^et^dns = 1 !Low-order word is the RETCODE value
!returned from the name manager.
, dns^et^spi = 2 !Low-order word is the STATUS value
!returned by one of the SPI procedures.