Article 165331 of comp.os.vms:
If you are using VMS MultiNet's DNS you might find this command
procedure useful.  It's simply a front-end to editting the
various DNS file in MULTINET:DOMAIN-NAME-SERVICE.*

The only caveats are that you may have to modify
the procedure somewhat to make it compatable with 
the way you have your DNS files formatted. 

It also makes use of the DNS_PTR.COM procedure in
the Multinet CD.

Anyway, I hope it is helpful to someone.



! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_UNPACK_VERIFY"))'
$!
$! This archive created:
$!  Name : DNS
$!  By   : mike.cliffe@saultc.on.ca
$!  Date : 13-FEB-1997 10:02:57.37
$!  Using: VMS_SHARE 8.5-1, (C) 1993 Andy Harper, Kings College London UK
$!
$! Credit is due to these people for their original ideas:
$!    James Gray, Michael Bednarek 
$!
$! To unpack this archive:
$!    Minimum of VMS 4.4 (VAX) / OpenVMS 1.0 (Alpha) is required.
$!    Remove the headers of the first part, up to `cut here' line.
$!    Execute file as a command procedure.
$!
$! The following file(s) will be created after unpacking:
$!       1. DNS.COM;1
$!
$ set="set"
$ set symbol/scope=(nolocal,noglobal)
$ f="SYS$SCRATCH:."+f$getjpi("","PID")+";"
$ if f$trnlnm("SHARE_UNPACK") .nes. "" then $ -
 f=f$parse("SHARE_UNPACK_TEMP",f)
$ e="write sys$error  ""%UNPACK"", "
$ w="write sys$output ""%UNPACK"", "
$ if .not. f$trnlnm("SHARE_UNPACK_LOG") then $ w = "!"
$ if f$getsyi("CPU") .gt. 127 then $ goto start
$ ve=f$getsyi("version")
$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto start
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$unpack:subroutine!P1=file,P2=chksum,P3=attrib,P4=size,P5=fileno,P6=filetotal
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'"
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn' File skipped"
$ delete 'f'*
$ exit
$dirok:
$ x=f$search(P1)
$ if x .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped"
$ delete 'f'*
$ exit
$file_absent:
$ w "-I-UNPACK, Unpacking ", P5, " of ", P6, " - ", P1, " - ", P4, " Blocks"
$ n=P1
$ if P3 .nes. "" then $ n=f
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT/NOJOURNAL 'f'/OUT='n'
PROCEDURE GetHex(s,p)LOCAL x1,x2;x1:=INDEX(t,SUBSTR(s,p,1))-1;x2:=INDEX(t,
SUBSTR(s,p+1,1))-1;RETURN 16*x1+x2;ENDPROCEDURE;PROCEDURE SkipPartsep LOCAL m;
LOOP m:=MARK(NONE);EXITIF m=END_OF(CURRENT_BUFFER);DELETE(m);EXITIF INDEX(
ERASE_LINE,"-+-+-+-+-+-+-+-+")=1;ENDLOOP;ENDPROCEDURE;
PROCEDURE ProcessLine LOCAL c,s,l,b,n,p;s := ERASE_LINE;c := SUBSTR(s,1,1);s :=
 s-c;IF c = "X" THEN SPLIT_LINE; ENDIF;MOVE_HORIZONTAL(-1);l := LENGTH(s);p :=
 1;LOOP EXITIF p > l;c := SUBSTR(s,p,1);p := p+1;CASE c FROM ' ' TO '`' ['`']
: COPY_TEXT(ASCII(GetHex(s,p))); p:=p+2;[' ']: p:=p+1;[INRANGE,OUTRANGE]
: COPY_TEXT(c);ENDCASE;ENDLOOP;ENDPROCEDURE;PROCEDURE Decode(b)LOCAL m;
POSITION(BEGINNING_OF(b));LOOP m:=MARK(NONE);EXITIF m=END_OF(b);DELETE(m);
IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+-")=1 THEN SkipPartSep;ELSE ProcessLine;
MOVE_HORIZONTAL(1);ENDIF;ENDLOOP;ENDPROCEDURE;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);t:="0123456789ABCDEF";f:=GET_INFO(
COMMAND_LINE,"file_name");o:=CREATE_BUFFER(f,f);Decode(o);WRITE_FILE(o,
GET_INFO(COMMAND_LINE,"output_file"));QUIT;
$ if p3 .eqs. "" then $ goto dl
$ open/write fdl &f
$ write fdl "RECORD"
$ write fdl P3
$ close fdl
$ w "-I-CONVRFM, Converting record format to ", P3
$ convert/fdl='f' 'f'-1 'f'
$ fa=f$getdvi(f$parse(f),"ALLDEVNAM")
$ Pa=f$getdvi(f$parse(P1),"ALLDEVNAM")
$ if fa .eqs. Pa then $ rename &f 'f$parse(P1)'
$ if fa .nes. Pa then $ copy &f 'f$parse(P1)'
$dl: delete 'f'*
$ checksum 'P1'
$ if checksum$checksum .nes. P2 then $ -
  e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ exit
$ endsubroutine
$start:
$!
$ create 'f'
X$!`20dns`20-`20Edit`20dns`20files`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20January`201995/Mike`20Cliffe
X$!
X$`20if`20p1`20.eqs.`20"?"`20.or.`20p1.eqs.`20"HELP"`20then`20gosub`20HELP
X$`20define/key`20pf1`20"down"/term/noecho/noerase/nolog
X$`20define/key`20pf2`20"up"/term/noecho/noerase/nolog
X$`20define/key`20pf4`20"exit"/term/noecho/noerase/nolog
X$`20define/key`20e4`20`20"select"/term/noecho/noerase/nolog
X$!
X$`20MISC_CNT`20=`202`09!`20number`20of`20miscellaneous`20files
X$`20l=2
X$!
X$`20cfg_file0`20`20=`20"MULTINET:DOMAIN-NAME-SERVICE.CONFIGURATION"
X$`20cfg_file_disp0`20`20=`20"CONFIGURATION"
X$!
X$`20RELOAD:
X$`20open/read`20namedboot`20multinet:domain-name-service.configuration
X$`20i=1
X$CFG:
X$`20read/end=EOF_CFG`20namedboot`20cfg_rec
X$`20primary=0
X$`20if`20f$extract(0,7,cfg_rec)`20.eqs.`20"primary"`20then`20primary=1
X$`20if`20f$extract(1,7,cfg_rec)`20.eqs.`20"primary"`20then`20primary=1
X$`20if`20primary
X$`20`20`20then`20inadr'i'=f$extract(10,27,cfg_rec)
X$`20`20`20cfg_file'i'`20`20=f$extract(37,f$length(cfg_rec),cfg_rec)
X$`20`20`20cfg_file_disp'i'`20=`20cfg_file'i'-"MULTINET:DOMAIN-NAME-SERVICE."
X$`20`20`20i=i+1
X$`20endif
X$`20if`20f$extract(0,5,cfg_rec)`20.eqs.`20"cache"
X$`20`20`20then`20inadr'i'=f$extract(10,27,cfg_rec)
X$`20`20`20cfg_file'i'`20`20=f$extract(37,f$length(cfg_rec),cfg_rec)
X$`20`20`20cfg_file_disp'i'`20=`20cfg_file'i'-"MULTINET:DOMAIN-NAME-SERVICE."
X$`20`20`20i=i+1
X$`20endif
X$`20goto`20CFG
X$EOF_CFG:
X$`20close`20namedboot
X$`20primary_max=i
X$!
X$SCREEN:
X$`20write`20sys$output`20"`1B`5BH`1B`5BJ`1B`5B7mComponent`20`20`20`20`20`7C`20
Vin-addr.arpa`20`20`20`20`7C`20Database`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`1B`5B0m"
V
X$`20write`20sys$output`20"`20`20`20Boot`20file:`09`09`09''cfg_file_disp0'"
X$`20write`20sys$output`20"`20`20`20Domain`20db:`09`09`09''cfg_file_disp1'"
X$`20write`20sys$output`20"`20`20`20Local`20db`20:`09`09`09''cfg_file_disp2'"
X$`20i=3
X$`20loop:
X$`20if`20i.lt.primary_max-(MISC_CNT-1)
X$`20`20`20`20then`20ra`20=`20f$extract(0,f$locate("in-addr.arpa",`20inadr'i'),
V`20inadr'i')
X$`20`20`20`20cf`20=`20cfg_file_disp'i'
X$`20`20`20`20write`20sys$output`20f$fao("`20`20`20Inv.`20map`20:`20!12AS!_!AS"
V,ra,cf)
X$!`20`20`20`20write`20sys$output`20"`20`20`20Inv.`20map`20:`20''ra'`09''cf'"
X$`20`20`20`20i=i+1
X$`20else`20goto`20END_SCREEN
X$`20endif
X$`20goto`20loop
X$END_SCREEN:
X$`20ra`20=`20f$extract(0,2,`20inadr'i')
X$`20cf`20=`20cfg_file_disp'i'
X$`20write`20sys$output`20"`20`20`20Cache`20db`20:`20''ra'`09`09''cf'"
X$!
X$!`20Other`20miscellaneous`20files
X$!`20update`20MISC_CNT`20symbol`20at`20top`20to`20reflect`20number`20of`20mice
Vllaneous`20files
X$!
X$`20i=i+1
X$`20cfg_file'i'`20=`20"MULTINET:LOCAL_ROUTES.COM"
X$`20cf`20=`20cfg_file'i'`20-`20"MULTINET:"
X$`20write`20sys$output`20"`20`20`20Routing`20`20:`20`09`09`09''cf'"
X$`20i=i+1
X$`20cfg_file'i'`20=`20"MULTINET:HOSTS.LOCAL"
X$`20cf`20=`20cfg_file'i'`20-`20"MULTINET:"
X$`20write`20sys$output`20"`20`20`20Hosts`20`20`20`20:`20`09`09`09''cf'"
X$!
X$`20primary_max=i
X$!
X$`20write`20sys$output`20"`1B`5B22;1H`1B`5B7mPF1`1B`5B0m=Down`20`20`20`20`7C
V`20`1B`5B7mPF2`1B`5B0m=Up`20`20`20`20`20`20`7C`20`1B`5B7mSELECT`1B`5B0m=Choose
V`20item`7C`20`1B`5B7mPF4`1B`5B0m=EXIT`20`20`20`20`20`7C`20`1B`5B7m?`1B`5B0m=He
Vlp"
X$`20write`20sys$output`20"`1B`5B23;1H`1B`5B7m`1B`5B7mB`1B`5B0moot`20server`20
V`7C`20Load`20`1B`5B7mC`1B`5B0monfig`20`7C`20install`20`1B`5B7mD`1B`5B0matabase
Vs`20`7C`20compile`20`1B`5B7mH`1B`5B0most`20`7C`20build`20`1B`5B7mI`1B`5B0mnver
Vse`1B`5B0m"
X$`20c=2
X$`20rc=79
X$MENU:
X$`20gosub`20GET_KEY
X$`20write`20sys$output`20"`1B`5B''l';''c'H>`1B`5B''l';''rc'H<"
X$`20if`20k.eqs.`20"I"`20then`20goto`20RELOAD
X$`20goto`20MENU
X$GET_KEY:
X$`20write`20sys$output`20"`1B`5B''l';''c'H>`1B`5B''l';''rc'H<"
X$!`20write`20sys$output`20"`1B`5B''l';''c'H>"
X$`20inquire`20k/nopunct`20"`1B`5B''l';''c'H"
X$`20if`20k.eqs.`20"DOWN"
X$`20`20then`20`20write`20sys$output`20"`1B`5B''l';''c'H`20`1B`5B''l';''rc'H`20
V"
X$`20`20`20l=l+1
X$`20endif
X$`20if`20k.eqs.`20"UP"
X$`20`20then`20`20write`20sys$output`20"`1B`5B''l';''c'H`20`1B`5B''l';''rc'H`20
V"
X$!`20`20then`20write`20sys$output`20"`1B`5B''l';''c'H`20"
X$`20`20`20l=l-1
X$`20endif
X$`20if`20l.lt.2`20then`20l=primary_max+MISC_CNT
X$`20if`20l.gt.primary_max+MISC_CNT`20then`20l=2
X$`20if`20k.eqs.`20"EXIT"`20then`20goto`20EXIT
X$`20if`20k.eqs.`20"SELECT"`20then`20gosub`20SELECT
X$`20if`20k.eqs.`20"?"`20then`20gosub`20HELP
X$`20if`20k.eqs.`20"D"`20then`20gosub`20INSTALL
X$`20if`20k.eqs.`20"H"`20then`20gosub`20HOSTS
X$`20if`20k.eqs.`20"I"`20then`20gosub`20INADDR
X$`20if`20k.eqs.`20"B"`20then`20gosub`20BOOT
X$`20if`20k.eqs.`20"C"`20then`20gosub`20RELOAD
X$`20if`20k.eqs.`20"R"`20then`20@multinet:local_routes
X$`20return
X$!
X$SELECT:
X$`20assign/user`20sys$command`20sys$input
X$`20x=l-2
X$`20filename=`20cfg_file'x'
X$`20write`20sys$output`20"`1B`5B20;1HEditting`20''filename'"
X$`20edit`20`20`20'filename'
X$`20goto`20RELOAD
X$!
X$HELP:
X$`20type`20sys$input
X`1B`5BH`1B`5BJThis`20utility`20provides`20a`20simple`20interface`20for`20updat
Ving`20the`20DNS`20files.`20`20The
Xnverse`20address`20tables`20can`20be`20built`20automatically`20with`20the`20
V`20I`20`20command.
X
XKEYS:`09PF1`20`20`20`20=`20Moves`20menu`20pointer`20down`09PF2`20=`20Moves`20m
Venu`20pointer`20up
X`09Select`20=`20Chooses`20option`09`09`09PF4`20=`20Exit
X
XCOMMANDS:`09B`20=`20Boot`20name`20server`20`20`20`09`09C`20=`20reload`20Config
Vuration`20file
X`09`09D`20=`20install`20Databases`09`09H`20=`20compile`20Host`20table
X`09`09I`20=`20build`20Inverse`20tables`09R`20=`20update`20static`20Routes
X
XBriefly,`20to`20add/modify/delete`20IP`20address`20information,`20make`20chang
Ves`20to`20the
XDomain`20DB`20file`20and`20update`20it's`20serial`20number.`20`20Then`20use`20
Vthe`20'I'`20command
Xto`20reflect`20your`20changes`20in`20the`20inverse`20tables.
X
XFor`20more`20information`20on`20DNS`20and`20when`20to`20use`20various`20option
V`20in`20this`20procedure`20
Xplease`20refer`20to`20the`20following`20documentation:
X`09TGV`20Multinet`20Administrator's`20Guide`20-`20Chapter`206`20`60Host`20Tabl
Ves`20and`20DNS'
X`09DNS`20and`20BIND`20in`20a`20Nutshell"
X$!
X$`20inquire`20z`20"Press`20return`20to`20continue"
X$`20if`20p1.nes.""`20
X$`20`20then
X$`20`20`20`20p1=""
X$`20`20`20`20return
X$`20else
X$`20`20`20`20goto`20RELOAD
X$`20endif`20
X$!
X$BOOT:
X$`20write`20sys$output`20"`1B`5B20;1H"
X$`20inquire`20z`20"Restart`20name`20server?`20`5BN`5D`20"
X$`20if`20z`20.eqs.`20"Y"`20then`20@multinet:start_Server
X$`20write`20sys$output`20"`1B`5B21;1H`20`20`20`20`20`20`20`20`20`20`20`20`20
V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20"
X$return
X$!
X$INSTALL:
X$`20@multinet:install_databases
X$`20return
X$!
X$INADDR:
X$`20write`20sys$output`20"`1B`5BH`1B`5BJBuilding`20Inverse`20Tables`20(inaddr.
Varpa)"
X$`20@inaddr`20execute
X$`20return
X$!
X$HOSTS:
X$`20multinet`20host_table`20compile
X$`20return
X$!
X$EXIT:
X$`20write`20sys$output`20"`1B`5B20;1H"
X$`20exit
$ call unpack DNS.COM;1 -
 478099475 "FORMAT STREAM_LF;CARRIAGE_CONTROL CARRIAGE_RETURN" 11 1 1
$ v=f$verify(v)
$ exit
!-----------------end-cut-here------------------------------



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mike Cliffe (MC307)    mailto:mike.cliffe@saultc.on.ca
 <>                  http://www.saultc.on.ca/~mcliffe/
<><>        Sault College, Sault Ste. Marie, ON CANADA



