Making a terminal locations file
The program described in this section implements the MAKELOCS command,
used for generating a file which describes the location and
characteristics of each terminal attached to the network. In fact,
the characteristics of the terminal are held elsewhere: MAKELOCS just
stores a unique number for each type of terminal.
Files used
Currently, four input files are required, and a single output file is
produced. In the descriptions given here, fields marked with * must
be present, but are ignored. The files are:
The PADs file
This file contains a line for each PAD in the network. It gives
the name of the PAD, and describes where the PAD may be found.
Each entry contains the following fields, separated by colons:
*PAD number - Line number of entry
PAD name - Name of PAD, up to 15 characters
PAD location - Where the PAD may be found
The TTYs file
This file contains a line for each terminal in the network. It
describes the type, building and location of each terminal, and gives
much other information not needed here.
Each entry contains the following fields, separated by colons:
PAD name - PAD to which the terminal is attached
*Line type - Multiplexer, PAD or interface type
*Hardware line - Multiplexer port number or interface number
Line number - Unique line number of terminal on that PAD
*Line speed - Usually 'auto'
*Line interface- Usually '20ma' or 'rs232'
Line status - Usually 'ok' or 'us' (null also means 'ok')
Last change - Date this entry was last altered
Local printer - Nearest printer to the terminal
Terminal type - Cryptic string (ignore part after comma)
Building - Building (or part) housing the terminal
Location - Identification of terminal within building
The locations file
This file contains a line for each possible PAD location, giving
useful groupings of PADs.
Each entry contains the following fields, separated by colons:
Location A - All PADs in same building have the same number
in this field
Location B - A number used to distinguish different PADs in
the same building
Description - A string describing the location
The mapping file
This file maps the cryptic terminal type names to the numbers
actually stored in the output file. It contains one line for each
mapping. Some mappings are one to one, and some are many to one.
Each entry contains the following fields, separated by colons:
Type name - The name found in the TTYs file
Type number - The number stored in the output file.
The output file
This is an unstructured data file containing a compressed, easily
accessed synopsis of the relevant information gleaned from the input
files. The filename '.' causes the default filename (currently
TERMLOCFILE) to be used.
The MAKELOCS command
This command is used to process the four input files, producing the
single output file. It is called as follows:
MAKELOCS(padsfile,ttysfile,locationsfile,mappingfile,outputfile)
If a parameter is omitted, a prompt is issued for it. At any stage, a
reply of ? will cause a short help message to be output.
The program outputs a small number of statistics during the run, which
concern the number of items found in the input files.