! This is the HELP input file for the VAX/VMS
! version of TES.  Invoked with
! LIBRARY/CREATE/HELP
! Processor will prompt for file names.
! Prepared by R. Hanson, Aug., 1982
1 TES

  The TES supports those computing activities associated
  with archiving, retrieving, updating and exporting textual
  material.  It is a program that operates on files having
  a "universal" format and delivers and reads text files
  in native format on the host system.

  When asking for HELP on TES commands, the complete
  command is listed.  Only the first four (4) characters
  are required.  This is also true for the TES program.

  The symbols [ ] enclose optional specifications;
  the ( ) symbols enclose alternatives--choose one;
  the < > enclose a CHARACTER string;  FUN is a Fortran
  unit number;  the { } enclose an integer string;
  MN denotes a module number in a TES format file.

  Note:  Simultaneously, distinct positive Fortran unit numbers must
         be used.
2 AUTHORS
 R. J. Hanson, Division 1642, Sandia National Laboratories, 844-1715
   and
 W. V. Snyder, Jet Propulsion Laboratory, Pasadena, California
3 REFERENCES
 1.  W. V. Snyder and R. J. Hanson, "Text Exchange System: A
     Transportable System for Management and Exchange of Programs
     and Other Text," JPL internal document number 1846-108, Aug. 1981.

 2.  W. V. Snyder and R. J. Hanson, "Text Exchange System, Installation
     Instructions and Description of System Dependent Variants," JPL
     internal document number 1846-109, Aug. 1981.

 3.  W. V. Snyder and R. J. Hanson, "Text Exchange System, Program
     Descriptions," JPL internal document number 1846-110, Aug. 1981.
2 COMMANDS

3 INTAPE
INTAPE=FUN [<logical name>] Default name=TEIO{FUN}.TES;vers.
  Define TES format input file.
  If the identical INTAPE designation is used, and the read position
  is at End-of-File, an End-of-File is skipped.

3 INPUT
INPUT FILE=FUN [<logical name>] Default name=EXCH{FUN}.TMP;vers.
  Define native format file from which to read commands and
  text.  Goes to READER file for commands after completion.

3 INCLUDE
INCLUDE=FUN [<logical name>] Default name=EXCH{FUN}.TMP;vers.
  Define file to be searched for modules of text to be auto-
  matically inserted as text is copied to the user file.
  FUN=0 closes the INCLUDE file.

3 TEXT
TEXT
  Indicate the text of a module follows the command.

TEXT=FUN [<logical name>] Default name=EXCH{FUN}.TMP;vers.
  Define file containing the text of a module.

3 READER
READER=FUN [<logical name>] Default name=EXCH{FUN}.TMP;vers.
  Define native format file from which to read commands.  A
  default value is provided, FUN=5, <logical name>=TT:.
  If FUN=5 is used, <logical name> will be TT:
  Can contain text and other 'INPUT FILE=' commands but not
  other 'READER=' commands.  FUN must be positive.

3 MARGIN
MARGIN=integer
  Define last column of input to be examined when interpreting
  commands.   A default value (180) is provided.  This command
  does not limit input text line lengths.

3 SIGNAL
SIGNAL=<1 character>
  A character used in col. 1 of text to identify INCLUDE requests
  and corrections, and in cols. 1-2 to identify the end of text
  or correction input.  If this command is not given a dash (-)
  is used.  This command goes after NAME= command,
  and before TEXT or TEXT= command.

3 REMOVE
REMOVE=<1 character>
  A character to be removed to compress text.  This character
  is reinserted in OUTPUT files or other native text.  If this
  command is not given, excess blanks are removed.

3 QUIT
QUIT [,R]
  Stop reading commands and text from the file containing this
  command. If the R modifier is used the file is rewound.
  This command gracefully closes all the files used during execution.
3 EXIT

  Use QUIT.

3 STOP

  Use QUIT.

3 HALT

  Use QUIT.

3 REWIND

  Rewind the TES format input file, INTAPE.
  (When INTAPE is attached as a magnetic tape, this command rewinds
  the entire reel.)
3 SKIP

SKIP=MN

  Position the TES format input file immediately
  after module number MN.
3 LIMIT

LIMIT=MN

  Module number MN on the TES format input file is
  the last one to be examined when executing the
  second (predicate controlled) form of the COPY
  command.

3 OUTAPE

OUTAPE [,U]=FUN [<logical name>]
Default name = TEIO{FUN}.TES;vers.

  Define TES format output file. The [,U] qualifier is
  needed when text is being changed or merged.
  If an OUTAPE was already open it is closed and
  a new one then opened.  (If the same OUTAPE is
  designated, an End-of-File is written.)
  FUN=0 closes the OUTAPE.  Nothing further will be written
  to this file.

3 OUTPUT_FILE

OUTPUT FILE=FUN [<logical name>] Default name=EXCH{FUN}.TMP;vers.

  Define native format file to receive text.
  If an OUTPUT FILE was already open it is closed and a
  new one then opened.
  FUN=0 closes the OUTPUT FILE.  Nothing further will be
  written to this file.

3 PRINTER

PRINTER=FUN <logical name>. Default name=EXCH{FUN}.LIS;vers.
  Define native format file to receive listings, remarks
  or error messages.  Default of FUN=6 provided, with
  <logical name>=TT:.  If FUN=6 is used, <logical name>
  will be TT:.  FUN must be positive.

3 WORK_FILE

WORK FILE=FUN

  TES uses new file <FOR{FUN}.DAT;vers.> for work area.
  This file is deleted by TES when program terminates
  normally.
3 TITLE

TITLE=<string of no more than 40 characters>

  Provide a title for the TES format output file.
  If none provided uses TITLE from INTAPE, if one is
  currently assigned.

3 SITE

SITE=<string of no more than 40 characters>

  Indicates where the TES format file was written.
  This is provided automatically on this machine.
  The SITE information can be overwritten if desired.

3 DATE

DATE=integer

  The integer must be ANSI standard form of day:
  YYMMDD.  Used to note when OUTAPE was written.
  DATE is provided by the system but can be over-
  written if desired.

3 IDENTIFY

IDENTIFY OUTPUT [,modifier] = first col., last col.,
                              step,start,<label>

  Provide sequence and label information in native
  format output file.  All parameters are individually
   optional.
4 [,modifier]
/C
Sequence numbers are derived from the position of
the image in the output file relative to the position
of the output file at the time the IDENTIFY OUTPUT
command was issued, and (C)ontinue across module
boundaries.
/F
Sequence numbers are derived from the position of the
image in the output file relative to the (F)irst record
of the text module.
/I
Sequence numbers are derived from the position of the
image in the module in the TES format (I)nput file.
Images copied from INCLUDE modules receive a sequence
number derived from the position of the request to
include text.
/O
Sequence numbers are derived from the position the image
has or would have in the module in the TES format
(O)utput file.  Images copied from INCLUDE modules
receive a sequence number derived from the position
of the request to include text.
3 OPTION
OPTION [,modifier] = [<string of letters>]
Each letter in the string denotes an option.
Deselect options with command OPTI.
4 [<string of letters>]
/A
Used with the L or S option.  If a DATA TYPE control
record having the first four characters equal
"LIST" is associated with the module to be listed,
the modules is output as though the V option
were selected.
/C
Commands necessary to reproduce the text module and
its associated control records are copied to the native
format output file for each text module.
/E
Each command is echoed on the PRINTER file.
/I
If a module is to be listed because the L or S option
is selected, text copied from INCLUDE files is also
listed in expanded form.
/L
Text modules that are copied, inserted or updated are
listed on the PRINTER file.
/S
Text modules inserted or updated are listed on the
PRINTER file.
/V
When a module is listed because the L or S option
is selected, col. 1 of each image is used as
Fortran vertical spacing control.
4 [,modifier]
/A
This modifier parameter specifies options to be selected in
addition to options already in effect.
/C
This modifier parameter specifies options to be cleared or
deselected.
3 COPY
COPY=MN,MN-MN

Copy one or more modules or ranges of modules whose position
on the TES input file are known.  Information is copied to the
files defined by the OUTAPE and OUTPUT commands, and to the
PRINTER file under appropriate OPTION and INDEX selections.


COPY [,modifier] = <logical expression in variables defined by
                    PREDICATE= >

Copy selected modules between the current position of the TES
input file and the module specified in a LIMIT command, or the
end of the file if no LIMIT command was specified.  Copy those
modules that satisfy the terms of the logical expression and
the restrictions of the modifier.

In the logical expression letters A through H denote predicates.
The letter N denotes the NULL predicate (always false),
+ denotes logical OR, - denotes ORNOT, * denotes AND, and /
denotes ANDNOT.  Precedence of operators is as for algebraic
expressions, and parentheses may be used.
4 [,modifier]

/X
Copy e(X)actly the first module for which the logical
expression is TRUE.
/P
Copy modules (P)rior to but not including the first module for
which the logical expression is TRUE.
/I
Copy modules prior to and (I)ncluding the first module for
which the logical expression is TRUE.
/S
(S)kip all modules prior to the first module for which the
logical expression is TRUE.
3 PREDICATE
PREDICATE = <label, (A-H)><control record abbreviation>
            <search mode, (A or X)><mask character>
            <search target>

Define a logical variable, search mode, and search target to be
used in the second or predicate-controlled form of the COPY
command.  The search target is compared with the text of each
control record of the designated type according to the mode of
search.  Here (A) means (A)nywhere in the text of the control
record, and (X) means the target is found in e(X)actly that
specified position.

Letters are considered as all upper case for the purpose of
matching the search target and the text.  Positions of the
search target containing the mask character are treated as
though they are equal to the corresponding character in the
text.

If the search target is found in the control record text in the
sense defined, the logical variable is made TRUE.  All variables
are made FALSE at the beginning of processing each module.
They may become TRUE as defined above and they thereafter remain
TRUE until the next module is processed.
3 INDEX
INDEX [,L] =[-] [<list of control record abbreviations>]

Control records specified in the list of control record
abbreviations are listed on the PRINTER file as each
module is copied, inserted or updated.  If the list
begins with (-) all control records except those specified
are listed.  If the L modifier is used, the index information
is listed only if the corresponding module contents are listed.
Deselect index information with command INDE.
2 CONTROL_RECORDS
This information is defined by the user for organizing
the text modules that are on a TES format file.  A great
deal of organization is possible and the amount required
will vary with each application.

This information is normally inserted with the text modules
as they are written in the TES format output file.
Control records for a text module can be in any order,
except for the NAME = record which must be first.
The only control record that is absolutely required is
the NAME = record.  All other control records must be inserted
between the NAME = record and TEXT or TEXT = command.

Users may wish to define control records for their own
applications.  The format is:

CONTROL,<F(HLNQTUVWXYZ)> = <character string>
3 NAME

NAME = <character string>

This is the logical name associated with this module.
Its abbreviation for the second form of the COPY is P.
3 AUTHOR

AUTHOR = <character string>

This is the name or names of the persons associated with
this unit of text.
Its abbreviation for the second form of the COPY is A.
3 COMMENT

COMMENT = <character string>

This information can be any comments about the text
module.
Its abbreviation for the second form of the COPY is C.
3 DATA_TYPE

DATA TYPE = <character string>

This is the type of data that constitutes the text of the
module.
Its abbreviation for the second form of the COPY is D.
3 GROUP

GROUP = <character string>

This is a logical category for this text module.
Its abbreviation for the second form of the COPY is G.
3 KEYWORD

KEYWORD = <character string>

This is a list of keywords or phrases concerning the text
module.
Its abbreviation for the second form of the COPY is K.
3 MACHINE
MACHINE = <character string>

This is intended to denote machine dependencies associated with
the text in this module.
Its abbreviation for the second form of the COPY is M.
3 REFERENCES

REFERENCES = <character string>

This information is intended to provide bibliographic
references.  In the case of programs or other text this
can be used to indicate references to global or external
data, or to external subprograms.
Its abbreviation for the second form of the COPY is B.
3 UPDATE

UPDATE = YYMMDD <character string>

This information is intended to provide for careful record
keeping about changes to text modules.  The ANSI form of the
date is required.  This control record is required when
changing lines of text or editing lines of text in a module
using TES.
Its abbreviation for the second form of the COPY is S.

3 ORIGIN
ORIGIN = YYMMDD <character string>

This information is intended to provide the date and place
where a module of text was first written or first filed
in TES format.  The ANSI form of the date is required.
Its abbreviation for the second form of the COPY is O.
2 UPDATING
  Control records and text may be updated separately.
3 Control_Record_Updating
  Assume the input TES file is positioned immediately before
  the module containing control records to be updated.
  Control records may be removed or changed, or new control
  records may be introduced.  Requests to remove or change
  control records must be presented in order.  New control
  records can only be added to the end of the list.
4 Removing Control Records
  To remove the j'th control record use
  -j
  where '-' is in column 1, the integer j follows immediately,
  and contains no embedded spaces.  The module name record may
  not be removed.
4 Changing Control Records
  To replace the text of the j'th control record use
  -j <replacement text>
  where '-' is in column 1, the integer j follows immediately
  and contains no embedded spaces, and at least one space
  precedes the replacement text.  The format of the replacement
  text is not checked.  Thus, control records that should begin
  with a date may be changed so that they do not begin with a
  date.
4 Adding Control Records
  Control records are added by inserting them after an UPDATE
  command:

  UPDATE=YYMMDD <descriptive text>
  <new control records>
  TEXT
  <instructions to update text, if any, see Text_Updating>
  --

 or

  UPDATE=YYMMDD <descriptive text>
  <new control records>
  TEXT={FUN} [<logical name] file of instructions to update text.
3 Text_Updating
  Text updating is line oriented.  A line of text may be
  removed, changed, or replaced, or new lines of text may be
  introduced.  Requests to update text begin with a signal
  character that is usually '-'.  The signal character may
  be changed by using the SIGNAL command, or by the sequence
  '-=*' when a request to update text is expected, where '-'
  is the current signal and '*' is the new signal.  The latter
  method of changing the signal is not recorded in the output
  TES file.  In the following discussions of updating text,
  the current signal is denoted by '-'.
  Change requests must be presented in order.
4 Introducing New Lines of Text
  To introduce new lines of text after line k use
  -k
  <new lines of text>
  where '-' is in column 1, the integer k follows immediately,
  and contains no embedded spaces.  Examination of the change
  request stops when the space following k is examined,
  allowing comments to be included.  New lines of text
  continue until a line having '-' in column 1 is input.
4 Replacing or Removing Lines of Text
  To replace lines m through n of text use
  -m,n
  <lines of replacement text>
  where - is in column 1, the integers m and n follow
  immediately, and contain no embedded spaces.  Examination
  of the change request stops when the space following n is
  examined, allowing comments to be included.  New lines of
  text continue until a line having '-' in column 1 is input.
  To remove lines m through n of text do not supply any
  replacement text.
4 Changing a Line of Text
  To change line k of text use
  -k$
  <editing commands>
  where '-' is in column 1, the integer k follows immediately, and
  contains no embedded spaces.  Examination of the change request
  stops when the dollar sign following k is examined, allowing
  comments to be included.  Editing commands are of the form
  [n1[,n2]]/<old text>/<new text>[/]
  where the first appearance of <old text> between columns n1 and
  n2 is replaced by <new text>.  If the length of <old text> is dif-
  ferent from the length of <new text>, text following <old text>
  will be shifted accordingly within the range n1, n2.  If ',n2' is
  omitted the span of effect is from column n1 to the end of the image,
  and the length of the image may change.  If in addition 'n1' is
  omitted the span of effect is the entire image.  If the terminal
  delimiter (denoted by '/') is omitted text following <old text> is
  removed before <old text> is replaced by <new text>.  To allow <old
  text> and <new text> to contain almost any character, the delimiter
  denoted by '/' above may be any character other than a digit, comma,
  or space, that does not appear in <old text> or <new text>.  If
  '-' is used for the delimiter it must not appear in column 1.
  Editing commands continue until a line having '-' in column 1 is
  input.  If several editing commands are submitted, the target for
  each after the first is the result of the previous.
2 READ_EXAMPLES

3 1 Retrieve entire TES file contents
      * TO GET EVERY MODULE FROM A TES FILE (ON UNIT 10)
      * TO A SYMBOLIC TEXT FILE (ON UNIT 11)
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      COPY=1-999
      QUIT
  This shows the simplest method for retrieving every module from
  the TES file.  The assumption in this example is  that  there
  are  no  more  than  999  text modules on the file.  A more direct
  technique for getting the entire contents of the tape  involves  a
  form  of  the  predicate controlled copy.
  One uses the so-called NULL predicate, N=NULL=Nothing.

      * TO GET EVERY MODULE FROM A TES FILE (ON UNIT 10)
      * TO A SYMBOLIC TEXT FILE (ON UNIT 11) COPY (EVERYTHING).
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      * THE '-' OPERATOR IN THE NEXT COMMAND MEANS 'OR NOT'.
      COPY=N-N
      QUIT
3 2 What's on a TES input file??????????
      * TO LIST ALL CONTROL INFORMATION FOR MODULES ON A
      * TES FILE (ON UNIT 10) TO THE PRINTER FILE, USE THE
      * INDEX COMMAND AND REQUEST LISTING OF EVERY
      * CONTROL RECORD BY EXCLUDING NOTHING.
      INTAPE=10 [VAX LOGICAL NAME]
      INDEX=-
      COPY=N-N
      QUIT
3 3 Copy some text modules from a TES file
      * TO COPY SELECTED TEXT MODULES (SEQUENCE NUMBERS
      * KNOWN) FROM THE TES FILE, SELECT THE NUMBERS
      * NEEDED.  SUPPOSE MODULES 1,2,5 THROUGH 15 AND 100
      * ARE NEEDED.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      COPY=1,2,5-15,100
      QUIT
3 4 Copy using selected control information
      * TO SELECT MODULES FROM A TES FILE CORRESPONDING
      * TO KEYWORDS OR PHRASES IN THE CONTROL INFORMATION USE
      * THE SECOND OR PREDICATE FORM OF THE COPY COMMAND.
      * FOR EXAMPLE ALL MODULES WITH A GROUP CONTROL RECORD
      * CONTAINING THE WORD "blas" CAN BE RETRIEVED FROM THE
      * TES FILE.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      PREDICATE=BGA BLAS
      COPY=B
      QUIT
      * HERE THE ABOVE STRING "(B)(G)(A) BLAS" STANDS FOR LOGICAL
      * VARIABLE LABELED B, EXAMINING INFORMATION IN CONTROL
      * RECORDS G (=GROUP), (A)NYWHERE WITHIN THESE CONTROL RECORDS,
      * SEARCHING FOR THE STRING OF 4 CHARACTERS, BLAS.

3 5 Copy with three logical operands
      * COPY MODULES HAVING GROUP CONTROL RECORDS
      * CONTAINING THE STRING "blas", THAT DO NOT HAVE MACHINE
      * CONTROL RECORD CONTAINING THE STRING "ibm" AND DATA
      * CONTROL RECORD CONTAINING THE STRING "assembler".
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      PREDICATE=BGA BLAS
      PREDICATE=CMA IBM
      PREDICATE=DDA ASSEMBLER
      * THE '/' OPERATOR MEANS 'AND NOT'.
      * THE '*' OPERATOR MEANS 'AND'.
      COPY=B/(C*D)
      QUIT
3 6 Limit the number of modules processed
      * THE MODULES TO BE RETRIEVED ALL HAVE NUMBERS BETWEEN
      * 101 AND 150.  RESTRICTING PROCESSING ACTIVITY TO THIS
      * RANGE MAY REDUCE PROCESSING TIME.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      * MOVE INPUT TAPE UP TO START OF MODULE 101.
      SKIP=100
      * LIMIT THE RANGE OF MODULE NUMBERS EXAMINED.
      LIMIT=150
      PREDICATE=BGA BLAS
      COPY=B
      QUIT
3 7 List module with line numbers
      * TEXT MODULE NUMBER 101 NEEDS TO BE UPDATED.
      * THE NUMBERS OF THE LINES ARE NEEDED SO THAT
      * THE UPDATES CAN BE INSERTED.
      INTAPE=10 [VAX LOGICAL NAME]
      OPTION=L
      COPY=101
      QUIT
3 8 Copy module with control records intact
      * MAJOR MODIFICATIONS ARE NEEDED IN TEXT MODULE NUMBERED
      * 101.  THE CONTROL RECORDS NEED TO BE KEPT INTACT WITH
      * THE TEXT MODULE. IT CAN BE REINSERTED INTO A TES
      * FILE LATER.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      OPTION=C
      COPY=101
      QUIT
3 9 Copy module including another module
  Text module number 100 contains the line image
      -I COMMON VARIABLES
  This signals the TES that the block of text named COMMON VARIABLES
  is to be inserted into the output file at this place.  Text module
  number 101 contains the text to be inserted:
      -I COMMON VARIABLES
      CCC
            COMMON /BLOCK/ A,B,C
      CCC
      --

      INTAPE=10 [VAX LOGICAL NAME]
      OUTPUT FILE=11
      * GET MODULE TO BE INCLUDED INTO OUTPUT FILE=11.
      COPY=101
      * REDESIGNATE OUTPUT FILE AND ASSIGN THE INCLUDE FILE=11.
      OUTPUT FILE=12
      INCLUDE FILE=11
      * REWIND THE INPUT TAPE BECAUSE MODULE NUMBER 100
      * IS BEHIND THE READ POSITION.
      REWIND
      COPY=100
      QUIT
2 WRITE_EXAMPLES

3 1 Make duplicate of TES file
  A  duplicate  copy  of  an existing TES file is desired. The output
  file = 15.  The SITE and DATE signifying where  and  when
  the data was copied must be specified.  The SITE input card is not
  needed if the output file is to  contain  only  modules  from  the
  input  file.  It is good practice to include a SITE input whenever
  a modified form of a TES file  is  created.   The  TITLE  is
  copied from the input to the output file.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTAPE=15
      SITE=(WHERE FILE IS BEING COPIED.)
      * TODAY IS CHRISTMAS DAY, 1979.
      DATE=791225
      * COPY EVERYTHING ON THE TES FILE.
      COPY=N-N
      QUIT
3 2 Put one module on TES file
  A  text  module consisting of a single Fortran subroutine
  is to be put on a TES file, unit = 15.

      OUTAPE=15
      TITLE=(NAME FOR THE FILE.)
      SITE=(WHERE FILE IS BEING WRITTEN.)
      DATE=(YYMMDD)
      * CONTROL RECORDS FOR THE NEW MODULE.
      NAME=(SUBROUTINE OR MODULE NAME.)
      ORIGIN=(YYMMDD)
      AUTHOR=(PERSON WHO WROTE THE SUBROUTINE.)
      DATA=FORTRAN
      * SUBROUTINE SOURCE CARDS START AFTER THE TEXT CARD.
      TEXT
             SUBROUTINE   .
             ...
             END
      --
      QUIT

3 3 Put several modules on TES file
  The following text is on unit = 11.
      ORIGIN=(YYMMDD SITE WHERE SUBROUTINES WERE WRITTEN.)
      AUTHOR=(PERSON WHO WROTE THE SUBROUTINES.)
      GROUP=(CLASSIFICATION OF THE SUBROUTINES.)
      REFERENCE=(JOURNAL ARTICLE RELEVENT TO THE SUBROUTINES.)
      DATA=FORTRAN
      MACHINE=PORTABLE
      KEYWORD=INDUSTRY-RECOGNIZED WORDS FOR THE PROGRAM FUNCTION.
      QUIT,R

  Then this is entered (on the terminal) for the subprograms.
      OUTAPE=15
      TITLE=(...)
      DATE=(YYMMDD)
      NAME=(SBNAME...)
      * GET CONSTANT CONTROL INFORMATION FROM FILE 11.
      INPUT FILE=11
      TEXT
             SUBROUTINE SBNAME(...)
             ...
             END
      --
      NAME=(...)
      INPUT FILE=11
      TEXT
             SUBROUTINE   .
             ...
             END
      --

      QUIT
3 4 Put modules from file onto TES file

  For  a  next  example we will modify the last example slightly.
  The only difference is that the subroutines  are  all   on
  unit number 12 as follows.
             SUBROUTINE SBNAME(...)
             ...
             END
      --
             SUBROUTINE   .
             ...
             END
      --
      QUIT

      NAME=(SBNAME...)
      * GET CONSTANT CONTROL INFORMATION FROM FILE 11.
      INPUT FILE=11
      * READ SUBROUTINE TEXT FROM UNIT 12.
      TEXT=12
      NAME=(...)
      INPUT FILE=11
      TEXT=12
      QUIT
3 5 Add module to the end of a TES file
  An existing TES file is on unit number 10.
  The TES output file is unit 15.  A new module is to be
  added to the end of the existing file to make a new file.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTAPE,U=15
      TITLE=(...)
      SITE=(...)
      DATE=(YYMMDD)
      * GET THE OLD FILE CONTENTS TO THE NEW FILE.
      COPY=N-N
      * INSERT THE NEW MODULE ON THE NEW FILE
      NAME=(...)
      ORIGIN=(YYMMDD)
      AUTHOR=(...)
      DATA=FORTRAN
      TEXT
             SUBROUTINE   .
             ...
             END
      --
      QUIT
3 6 Updating entire lines on TES file

      INTAPE=10 [VAX LOGICAL NAME]
      OUTAPE,U=15
      TITLE=(...)
      DATE=(YYMMDD)
      * COPY THE MODULES THAT REQUIRE NO CHANGE.
      COPY=1-100
      * INSERT A CARD AT THE FRONT OF THE PROGRAM,
      * REMOVE LINE 5, INSERT A LINE AFTER LINE 7,
      * AND REPLACE LINE 9 THROUGH 11 BY FOUR NEW LINES.
      UPDATE=(YYMMDD)
      TEXT
      -0
      C      SOME COMMENT.
      -5,5
      -7
             A=0.
      -9,11
             B=0.
             C=0.
             D=0.
             E=0.
      --
      * COPY THE REMAINING MODULES THAT ARE UNCHANGED.
      COPY=N-N
      QUIT
3 7 Editing individual lines on TES file
  In this next example  the only difference from the last
  is that module number 101 needs editing.  The input for INTAPE,
  OUTAPE, etc. is identical through the UPDATE card.
      TEXT
      -27$ CHANGE REAL*4 TO REAL IN LINE 27.
      /REAL*4/REAL/
      --
      COPY=N-N
      QUIT
3 8 Updating control records on TES file
  In this next example the only difference from the last  example
  is  that  module  number  101  requires  changes  in  the  control
  information.  The input is identical through the COPY=1-100  card.
      * REMOVE CONTROL RECORD NUMBER 2, CHANGE CONTROL RECORD
      * NUMBER 4, AND INSERT A NEW GROUP CONTROL RECORD.
      -2
      -4 (NEW TEXT FOR CONTROL RECORD 4.)
      UPDATE=(YYMMDD)
      GROUP=(NEW GROUP CONTROL RECORD.)
      TEXT
      --
      COPY=N-N
      QUIT
3 9 Merge two TES files
  In this example one wants to take two  TES  files,  on units
  numbered  10  and 11, and merge them to write a merged  file
  file on unit number 15.
      INTAPE=10 [VAX LOGICAL NAME]
      OUTAPE,U=15
      TITLE=(...)
      SITE=(...)
      DATE=(YYMMDD)
      COPY=N-N
      * OPEN A NEW INTAPE ON FILE 11.
      INTAPE=11 [VAX LOGICAL NAME]
      COPY=N-N
      QUIT
2 TAPES

3 INPUT

1.  To COPY TES format files from an unlabelled magnetic tape:
       $MOUNT/FOREIGN/BLOCKSIZE=3700 MT:
       $COPY MT: [disk filename]
       $COPY MT: [disk filename]   (to copy the second TES file)

    Suggestion:  Use filenames of the form  'filename.TES;ver'  for
                 TES disk files.

2.  To use a TES format tape file as the INTAPE for the program:
       $MOUNT/FOREIGN/BLOCKSIZE=3700 MT: [dummy label] [VAX logical name]
       $TES
       *INTAPE=10 [VAX logical name]
         .
         .
         .
       *INTAPE=10 [VAX logical name]   (When at End-of-File on INTAPE,
         .                              reopening the same INTAPE allows
         .                              the next TES file on the tape to
         .                              be processed.)
       *QUIT


3 OUTPUT
1.  To COPY TES format files to an unlabelled magnetic tape:
       $MOUNT/FOREIGN/BLOCKSIZE=3700 MT:
       $COPY [disk filename] MT:
       $COPY [disk filename] MT:    (to copy a second TES file to tape)

2.  To use a magnetic tape as the OUTAPE for the program:

       $MOUNT/FOREIGN/BLOCKSIZE=3700 MT: [dummy label] [VAX logical name]
       $TES
       *OUTAPE=10 [VAX logical name]
         .
         .
         .
       *OUTAPE=10 [VAX logical name]    (Reopening the same OUTAPE unit
         .                               write an End-of-File on the tape.
         .                               A subsequent COPY command will
         .                               cause another TES file to be
       *QUIT                             created on the OUTAPE.)

