Procedure to update ACNET nodes (Revised 9-17-04)
--------------------------------------------------

Which Node Number to Assign
---------------------------
New IP nodes are assigned to trunks 9 through 14 (as
available).  Only nodes 1 thru 239 are available, as nodes
in the range 240-255 are always be reserved for multicast.
Node 0 is never used.  Note that VAXes are also assigned
to trunk 8 (raw ethernet).

VAXes and Linac nodes have been assigned special ranges
on trunk 9 and 10.  The easiest way to find a free node
is to run the program DW:[DWIN.ACNET.TABLES]SHOWFREENODES,
which displays available nodes for a particular category
(VAX consoles, VAX central nodes, Linac, and General).
It is driven off of the master nodes file: NODES.TXT in
DW:[DWIN.ACNET.TABLES].

Trunk-Node Reuse
----------------
If a previously-used trunk-node is being reused, you must
ensure that someone has obsoleted or deleted all Acnet
devices belonging to the old node.

NODES.TXT
---------
Edit NODES.TXT in DW:[DWIN.ACNET.TABLES], and don't
forget to modify the record count field in the first
record (columns 76-79) of this file.  Please refer to
DWIN_DISK:[DWIN.ACNET.DOC]NODES.DOC for information
about the structure of this file.

NODES.TXT must be validated and copied to the
[DWIN.DOWNLOAD.ACNET] area using the following command
file invocation: $@NET$COM:COPY NODES.TXT

NET$COM is defined by the command file DW:[DWIN.ACNET]INIT.COM

You must also copy NODES.TXT to the OPER cluster VAXes,
but you only need to copy this file ONCE (on any cluster
machine) -- to the SYS$COMMON:[ACNET] area.  Files in this
area are shared by all five OPER cluster machines.
DO NOT copy NODES.TXT to SYS$SYSROOT:[ACNET], which is specific
to only a single machine.  There is a command file,
OP$USR1:[JOHNSON]OCOPY.COM, which you may find helpful
in copying files to the OPER cluster.

NODExx.TXT
----------
If there is any change to the physical node addressing,
the files NODE0.TXT (trunk 0 only), NODE8.TXT (trunk
8 only), NODE9.TXT (trunk 9 only), NODE10.TXT (trunk
10 only), NODE11.TXT (trunk 11 only), NODE12.TXT (trunk
12 only), NODE13.TXT (trunk 13 only), or NODE14.TXT (trunk
14 only) may need to be modified.  The master copy of these
files is also in DW:[DWIN.ACNET.TABLES], and should be copied
to the same operational areas as given above (for NODES.TXT).
The NET$COM:COPY procedure may be used to copy these files
to the [DWIN.DOWNLOAD.ACNET] area.

To get these tables actively used (without restarting
ACNET), however, requires a separate procedure which
is described later in this document.

UPDATE_NODES_TXT.COM
--------------------
Console nodes will not get the new NODES.TXT tables
until their next console restart.  To force an earlier
download of NODES.TXT to all consoles, the following
command file can be executed from any privileged
account on a console node:
	DWIN_DISK:[DWIN.ACNET.COM]UPDATE_NODES_TXT.COM
It will request a password, and the user must respond with
the XCONSOLE password (since SYSMAN is used).

NODEHISTORY.TXT
---------------
Make a log entry at the end of the following file:
	DWIN_DISK:[DWIN.ACNET.TABLES]NODEHISTORY.TXT
The structure of this file should be obvious.  This file
is used to record all changes to NODES.TXT (EXCEPT for
pseudo nodes).  Additions, deletions, and name changes are
all recorded.

NEWNODES.COM
------------
On each non-console VAX:  execute the command file:
	--> ACNET$EXE:NEWNODES.COM
This will set a system logical that forces any active
task that is using one of the dynamic node translation
routines (e.g. NET_TRN_NODE) to flush their cache.
On console VAXes, this command procedure is performed
by UPDATE_NODES_TXT described above.

IPNAMES.TXT and Sybase Tables
-----------------------------
For trunk 9 - 14 nodes:  if the nodename has
changed (or is being added), you must update the file
IPNAMES.TXT.  This file has only one copy which is located in
DW:[DWIN.ACNET.TABLES], and contains both the ACNET and
IP node names.  Nodes in this file MUST be in the same
order as they exist in NODES.TXT!
It is used by the NODES.COM procedure (see below).

The command file DW:[DWIN.CENTRAL.SYBASE.SQL.ACCDB]NODES.COM
will generate NODES.SQL.  This SQL script file,
when executed as a DCL command procedure, will update
the ACNET_NODE table in accdb.

NODES.COM requires one or more parameters: either
ALL, or a list of (8 max) nodes to update (whitespace separation).
Note: deleted nodes are not automatically removed by this
procedure, but you may edit the NODES.SQL script file before
execution to add node deletion statements such as the following:
	delete acnet_node where node_name="FUBAR"
	go

You should not need to perform the NODES procedure on ALL nodes,
but if you do, it would be best to execute NODES.SQL as a batch
job, and then search the log file for errors (search for "Msg").

D98 and Node Information
------------------------
Add node information to central database using D98 (PA1623).
This application program updates and/or modifies the database
table appdb.johnson.acnet_node_info.  Deleted nodes are simply
marked as "OBSOLETE".  If the node requires a new system,
hardware/software platform, status, or area -- you need to do
two things before running D98:
	1.  Use isql to add the entry to one or more of the
	    following tables:
		appdb.johnson.acnet_system_descr
		appdb.johnson.acnet_hardware_descr
		appdb.johnson.acnet_software_descr
		appdb.johnson.acnet_status_descr
		appdb.johnson.acnet_area_descr
		appdb.johnson.acnet_opsys_descr
	2.  Edit CLIB_INCLUDE:NODEINFODB.H

INCLUDE and HEADER modules need to be updated:
  Using the editor, update:
	CLIB$INCLUDE:NODEDEFS.INC  and
	CLIB$INCLUDE:NODEDEFS.H
Note that pseudo nodes have not been added to these include/header
files.  If needed, they could be added in the future.

V:ACNET
-------
As a rule when adding a new ACNET node V:ACNET does not need to
announce (i.e. do not set V:ACNET to any value).

After changing a physical address and the name servers have been
updated, one announces that ACNET addresses have changed by setting
V:ACNET to value 2.  This will cause the engine's to go to the name
server again to learn the physical address.

After changing a significant characteristic of an ACNET node in the
node tables, one announces that AcnetNodeInfo data has changed by
setting V:ACNET to value 1.  This will cause the engines to reread
the node info tables.

After renaming a node, it is necessary to set V:ACNET to 2, followed
by setting V:ACNET to 1.

The consolidation assignments change announcement (value 5) need only
done after the consolidation files have been modified on the engine
server and the change is to take place without restarting all engines.

J:{node} Device
---------------
After adding a new ACNET node, you should add a device to monitor it
having the name J:{node}.  For real nodes, you can replicate J:TEV or
J:TECAR, and for pseudo nodes you can replicate J:STATES.  The alarm
block should be BYPASSED unless the node will become operational in
the very near future.

Make sure to update the descriptive text and the digital alarm text
with the new node's name.  Then create web help for the device which
is a copy of the help for J:TEV (go to console page D80, enter J:{node},
hit "Help" key with cursor under device name).  A web page will be
displayed that says that no help exists for this device.  Click on the
button "Yes - Copy One".  Then on the next web page enter the name of
the device that you just copied.  You have now created help for your
new device which is exactly the same as for the copied device.  Now,
edit this help and replace occurrences of the old node name with your
new node name. 

---------------------------------------------------
Procedures to Propagate Certain Tables to All nodes
---------------------------------------------------

[Note: the VAX node you are running on will be referred to as the
"base node"  -- this is the system which will run SENDTABLE to
propagate the table to other nodes.

NODE0.TXT
	Either restart ACNET on the base node, or use the ASSIGN
	program utility to update the PNA table on the base node.

	The ASSIGN utility is located in ACNET_EXE.  It will prompt
	for the "target node" -- enter the "base node".  Enter
	"H" for help.  You will use the "R" and the "W" commands
	to update the PNA table on the base node using the new
	version of NODE0.TXT.

	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL
		SNDTAB>TEST		[only if test nodes need table]
		SNDTAB>^Z
NODE8.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE8.TXT/ETHERNET
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/ETHER
		SNDTAB>TEST/ETHER	[only if test nodes need table]
		SNDTAB>^Z
NODE9.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE9.TXT/IP0
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/IP0
		SNDTAB>TEST/IP0		[only if test nodes need table]
		SNDTAB>^Z
NODE10.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE10.TXT/IP1
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/IP1
		SNDTAB>TEST/IP1		[only if test nodes need table]
		SNDTAB>^Z
NODE11.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE11.TXT/IP2
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/IP2
		SNDTAB>TEST/IP2		[only if test nodes need table]
		SNDTAB>^Z
NODE12.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE12.TXT/IP3
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/IP3
		SNDTAB>TEST/IP3		[only if test nodes need table]
		SNDTAB>^Z
NODE13.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE13.TXT/IP4
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/IP4
		SNDTAB>TEST/IP4		[only if test nodes need table]
		SNDTAB>^Z
NODE14.TXT
	Either restart ACNET on the base node, or use NETGEN running
	from a privileged account:
		$ RUN ACNET$EXE:NETGEN
		NETGEN>MOD
		NETGEN>READ ACNET$EXE:NODE14.TXT/IP5
		NETGEN>EXIT
	Then:
		$ RUN ACNET$EXE:SENDTABLE
		SNDTAB>ALL/IP5
		SNDTAB>TEST/IP5		[only if test nodes need table]
		SNDTAB>^Z

Generally, you can ignore SENDTABLE errors that occur on many nodes.
These nodes may be down, or they do not support the type of table being
sent.  In fact, you should expect errors on many nodes, either
time-out or bad parameter errors.

The SENDTABLE will request confirmation before sending node tables
to certain Central VAXes.  Go ahead and confirm with 'Y'.

------------------------------------------------
Maintaining the DOWNLD table for Linac/IRM nodes
------------------------------------------------

Generally, but not always, Linac/IRM nodes must be entered into
the database table appdb.johnson.downld_data.  This table is used
by the Linac DOWNLD program to download central database device
changes to various Linac/IRM nodes.  Check with Bob Florian
if the node needs to be entered into this table.

ISQL must be used to modify this table.  The structure of the
table is pretty simple.  The "clinks" column defines the date
and time that the node was last successfully downloaded.
For a new node, this field should generally be set to the
current time.