UPD reads two files. The file named SRC
contains the base
version of the source code for the program. This file can be broken
up into separately named sections with ``*DECK name
'' cards.
However, TRANSX uses only the single deck named ``TRANSX
.''
For simplicity, there is no counterpart to the binary ``program
library'' used in the UPDATE system. The second file is
called UPN
, and it contains the commands to modify the base
source file into a compiler input file for the current version.
The following example illustrates the features of the UPN
file
needed for maintaining the TRANSX code:
*CPL *LST *IDENT UP1 */ 6 JAN 92 -- INCREASE SIZE OF MAIN CONTAINER ARRAY *D TRANSX.182 DIMENSION A(500000) *D TRANSX.222 NAMAX=500000 *IDENT VERS */ VERSION UPDATE FOR TRANSX *D TRANSX.12 C VERS. 2.1 (6 JAN 92) *D TRANSX.216 DATA VERS/' VERS. 2.1 (6 JAN 92)'/ *IDENT UNICOS */ ---------------------------------------------------- */ MACHINE-DEPENDENT CHANGES TO TRANSX */ FOR CRAY-XMP MACHINES USING UNICOS AT LOS ALAMOS */ ---------------------------------------------------- */ ELAPSED TIME *D TRANSX.3806 CALL SECOND(TIME) */ DATE *D TRANSX.3816 CALL DATE(HDATE) */ WALL CLOCK TIME *D TRANSX.3826 CALL CLOCK(HTIME)The first line of this example gives the command
CPL
,
which causes a compiler input file named CPL
to be
written containing the updated program. The command LST
causes a listing file named LST
to be written. These
listing files are a little easier to read than normal CPL files.
The first set of changes begins with the card *IDENT UP1
.
The modified lines on the CPL
or LST
files
will contain labels like UP1.2
, UP1.3
,
etc. This particular ``ident'' changes two lines in order to
increase the size of the main container array. The symbol
``*/
'' introduces a comment line. It is very important
for QA purposes to include comments in each ident that describe
the purpose of the change. It is also very important that each
change be dated as shown.
The next ident updates the version label on the code listing and
the version string that is written to every TRANSX listing file.
The numbering convention used for TRANSX is suggested by this
example. Including an ident called UP1
increments the
TRANSX version to 2.1; UP2
would give 2.2; and so on.
Note that the date from the last ident is transferred to ident
VERS
. This scheme will be used for all ``official''
changes to TRANSX. Users are free to make private changes using
their own special ident names.
The third ident implements some machine-dependent changes. These changes will be discussed below.
The general format for the delete command is
*D line1,line2If ``
,line2
'' is omitted, line2
is taken to be the same
as line1
. The actual values for the line references can
refer to lines in the base code (e.g., TRANSX.234
)
or to changed lines (e.g., UP1.2
). In general,
any line label that appears on the current CPL or LST file can
be used. The delete command causes the range of lines
named to be removed, and any text following the command
is inserted at that point in the file. The insert command
has the form
*I line1Any text following the command is inserted after the named line. There is also a ``before'' command:
*B line1that causes the following lines to be inserted before the named line. Other features of the UPD code and more details on its use will be found in the UPD report.
TRANSX HyperText Manual
TRANSX HyperText Help Package
T-2 Nuclear Information Service