From:	ADVAX::"mcnc!pucc.PRINCETON.EDU!FLOWERS%MEMSTVX1.BITNET" "Harry Flowers" 26-JUL-1990 20:35:27.56
To:	Arisia::Everhart
CC:	
Subj:	DECUS Software

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Thu, 26 Jul 90 20:35:31 EDT
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.12) with UUCP
	id AA13994 for everhart; Thu, 26 Jul 90 20:35:17 -0400
Received: from pucc.PRINCETON.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA26098; Thu, 26 Jul 90 17:33:51 EDT
Message-Id: <9007262133.AA26098@mcnc.mcnc.org>
Received: from MEMSTVX1.BITNET by pucc.PRINCETON.EDU (IBM VM SMTP R1.2.2MX) with BSMTP id 4465; Thu, 26 Jul 90 17:34:08 EDT
Date: Thu, 26 Jul 90 16:34 CDT
From: Harry Flowers <mcnc!pucc.PRINCETON.EDU!FLOWERS%MEMSTVX1.BITNET>
Subject: DECUS Software
To: Arisia::Everhart
X-Vms-To: IN%"Everhart@Arisia.dnet.ge.com"
 
I just sent today the tape I told you I'd send with my corrections on it.
It's just the stuff I sent you by E-mail, plus an AAAREADME.TXT to document
the changes.
 
On another track, I use Andrew Pavlin's ETHERMON program and really like it.
I have a couple of command procedures that help update ETHERMON.ETH_ADDRESSES,
which he may wish to add to his distribution.  On the chance that you may want
it anyway, I am sending it along as well.  Please forward him a copy if you
think he might find it useful.
._   _.  .___.  ._. ._.  v------------------------------------------------+
| \ / | / ____\ | | | |  | Harry Flowers             Phone: (901)678-2663 |
||\v/|| \____ \ | |_| |  | Bitnet: FLOWERS@MEMSTVX1    Systems Programmer |
|| v || \_____/ \_____/  | Internet: not yet :-(, but soon :-)    VAX/VMS |
Memphis State University | USmail: 112 Admin Bldg, MSU, Memphis, TN 38152 |
                         ^------------------------------------------------+
$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'
$!
$! This archive created by VMS_SHARE Version 7.2-007  22-FEB-1990
$!   On 26-JUL-1990 16:30:16.68   By user FLOWERS
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. DECNET_LOAD.COM;1
$!       2. UPDATE_ETHADDR.COM;1
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ 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=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete 'f'*
$ exit
$file_absent:
$ 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:
$ w "-I-PROCESS, Processing file ''P1'."
$ if .not. f$verify() then $ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=
CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));
LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);
IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;
MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;
ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=
1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";
POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);
ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;
COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,
"output_file"));ENDPROCEDURE;Unpacker;QUIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create 'f'
X$!`09DECNET_LOAD.COM - Get DECnet node names for Pavlin's ETHERMON
X$!
X$`09NCP == "$NCP"
X$`09DEFINE/USER_MODE SYS$OUTPUT DECNET_LOAD.TMP1
X$`09NCP SHOW KNOWN NODE CHAR
X$`09SEARCH/EXACT/WINDOW=(3,0)/OUTPUT=DECNET_LOAD.TMP2 -
X`09`09DECNET_LOAD.TMP1 "Hardware address"
X$`09DELETE/NOLOG/NOCONFIRM DECNET_LOAD.TMP1;*
X$`09CLOSE/NOLOG DFILE
X$`09CLOSE/NOLOG EFILE
X$`09OPEN/READ DFILE DECNET_LOAD.TMP2
X$`09OPEN/WRITE EFILE DECNET.ETH_ADDRESSES
X$ LOOP:
X$`09READ/END=FINISHED DFILE ALINE`09!Node
X$`09NODE = F$ELEMENT(1,"(",ALINE) - ")"
X$`09READ/END=FINISHED DFILE ALINE`09!Blank
X$`09READ/END=FINISHED DFILE ALINE`09!Controller
X$`09READ/END=FINISHED DFILE ALINE`09!Ethernet
X$`09ETH = F$EDIT(F$ELEMENT(1,"=",ALINE),"COLLAPSE")
X$`09RETH =`09F$ELEMENT(5,"-",ETH) +-
X`09`09F$ELEMENT(4,"-",ETH) +-
X`09`09F$ELEMENT(3,"-",ETH) +-
X`09`09F$ELEMENT(2,"-",ETH) +-
X`09`09F$ELEMENT(1,"-",ETH) +-
X`09`09F$ELEMENT(0,"-",ETH)
X$`09WRITE EFILE RETH + " D:" + NODE
X$`09READ/END=FINISHED DFILE ALINE
X$`09GOTO LOOP
X$ FINISHED:
X$`09CLOSE DFILE
X$`09CLOSE EFILE
X$`09DELETE/NOLOG/NOCONFIRM DECNET_LOAD.TMP2;*
X$`09WRITE SYS$OUTPUT "LOAD DECNET.ETH_ADDRESSES in ETHERMON, then SAVE"
X$`09EXIT
$ CALL UNPACK DECNET_LOAD.COM;1 134500942
$ create 'f'
X$!`09UPDATE.COM - Update ETHERMON.ETH_ADDRESSES file for Pavlin's ETHERMON
X$!
X$`09CLOSE/NOLOG NEWFIL
X$`09CLOSE/NOLOG ETHFIL
X$`09OPEN/WRITE NEWFIL UPDATE.ETH_ADDRESSES
X$`09OPEN/READ/SHARE ETHFIL ETHERMON.ETH_ADDRESSES
X$ LOOP:
X$`09READ/END=FINISHED ETHFIL ALINE
X$`09ALINE = F$EDIT(ALINE,"COMPRESS,TRIM")
X$`09LINELEN = F$LENGTH(ALINE)
X$`09INTADDR = F$EXTRACT(0,12,ALINE)
X$`09NEWLINE = INTADDR
X$`09EXTADDR = F$EXTRACT(10,2,INTADDR) + "-" +-
X`09`09F$EXTRACT(08,2,INTADDR) + "-" +-
X`09`09F$EXTRACT(06,2,INTADDR) + "-" +-
X`09`09F$EXTRACT(04,2,INTADDR) + "-" +-
X`09`09F$EXTRACT(02,2,INTADDR) + "-" +-
X`09`09F$EXTRACT(00,2,INTADDR)
X$`09WRITE SYS$OUTPUT "For Ethernet Address ''EXTADDR':"
X$!
X$!`09DECnet information
X$`09DECNETLOC = F$LOCATE("D:",ALINE)
X$`09IF DECNETLOC .EQ. LINELEN
X$`09THEN`09INQUIRE DECNET "  DECnet node name"
X$`09ELSE`09DECNET = F$ELEMENT(0," ",F$EXTRACT(DECNETLOC+2,80,ALINE))
X`09`09WRITE SYS$OUTPUT "  DECnet node name: ''DECNET'"
X$`09ENDIF
X$`09IF DECNET .NES. "" THEN NEWLINE = NEWLINE + " D:''DECNET'"
X$!
X$!`09Internet information
X$`09INETLOC = F$LOCATE("I:",ALINE)
X$`09IF INETLOC .NE. LINELEN
X$`09THEN`09INETINFO = F$ELEMENT(0," ",F$EXTRACT(INETLOC+2,80,ALINE))
X$`09`09INETADDR = F$ELEMENT(0,"'",INETINFO)
X$`09`09INETNODE = F$ELEMENT(1,"'",INETINFO) - "'"
X$`09`09WRITE SYS$OUTPUT "  Internet node address: ''INETADDR'"
X$`09`09IF INETADDR .EQS. INETNODE
X$`09`09THEN`09INQUIRE INETNODE "  Internet node name"
X$`09`09`09IF INETNODE .EQS. "" THEN INETNODE = INETADDR
X$`09`09ELSE`09WRITE SYS$OUTPUT "  Internet node name: ''INETNODE'"
X$`09`09ENDIF
X$`09`09NEWLINE = NEWLINE + " I:" + INETADDR + "'" + INETNODE + "'"
X$`09ENDIF
X$!
X$!`09Misc. information
X$`09MISCINFO = ""
X$`09MISCLOC = F$LOCATE("M:",ALINE)
X$`09IF MISCLOC .NE. LINELEN
X$`09THEN`09MISCINFO = F$EXTRACT(MISCLOC+2,80,ALINE)
X$`09`09WRITE SYS$OUTPUT "  Misc. information: ''MISCINFO'"
X$`09ENDIF
X$`09READ/PROMPT="  New misc. information `5B''MISCINFO'`5D: " -
X`09`09SYS$COMMAND MISCNEW`20
X$`09IF MISCNEW .EQS. "" THEN MISCNEW = MISCINFO
X$`09IF MISCNEW .NES. "" THEN NEWLINE = NEWLINE + " M:" + MISCNEW
X$`09WRITE NEWFIL NEWLINE
X$`09GOTO LOOP
X$ FINISHED:
X$`09CLOSE ETHFIL
X$`09CLOSE NEWFIL
X$`09WRITE SYS$OUTPUT -
X`09`09"Updated ETHERMON.ETH_ADDRESSES in UPDATE.ETH_ADDRESSES"
X$`09DIFF ETHERMON.ETH_ADDRESSES UPDATE.ETH_ADDRESSES
X$`09EXIT
$ CALL UNPACK UPDATE_ETHADDR.COM;1 943357031
$ v=f$verify(v)
$ EXIT
