! Modified by Frank J. Nagy, Fermilab Accelerator Controls, 22-Mar-83
1 ETAPE
 ETAPE is a general-purpose program for handling EBCDIC tapes.  It
 allows the user to move around at will within the tape, send output
 to different files, specify different blocksizes and record lengths
 for different files on the tape, and combine multiple tape files
 into a single output file.  The capability of writing an EBCDIC tape
 from an ASCII file is also included. 

 ETAPE removes all trailing blanks from tape records after reading
 them.  On output, records will be blank padded and blocked to create
 fixed length tape blocks.  A switch can be set to turn off the
 EBCDIC translation and allow the translation (or writing) of ASCII
 tapes.

2 Usage
 ETAPE assumes that the user has already allocated a tape drive and
 mounted the tape, giving it the logical name "TAPE:".  An example
 might be - 

	$ ALLOCATE  MSA0:  TAPE:
	$ MOUNT/FOREIGN  TAPE
	$ RUN FERMI$EXE:ETAPE
	ETAPE>

 The program prompts for input with the message "ETAPE>" and expects
 a 2 letter command followed by a (sometimes optional) parameter.
 The parameter must be separated from the command by exactly one
 space.  Some commands take numeric parameters and others take
 alphanumeric text.  A description of the commands can be obtained
 by asking for help on any particular command under the "Commands"
 subtopic.

 After each command that results in some tape movement, the program
 will print a message like "nnn:mmmm ==> file  (rrrr)" which means
 the tape is at file nnn, block mmmm, and output is currently going
 to "file" (TTY means to the terminal) and rrrr records have been
 written to that file so far. 

2 Commands
 A brief list of the ETAPE commands is given below.  More help is
 available under the "ETAPE Commands xx" subtopics.

  BB nnn   backspace nnn blocks
  BF nnn   backspace nnn files
  BL nnn   set blocksize for subsequent operations
  FI file  send translated output to specified file
  HE cc    request help on a particular command
  LR nnn   set logical record length (for deblocking records)
  QU       dismount tape and exit
  RW       rewind tape (and continue operations)
  SB nnn   skip nnn blocks in a forward direction
  SF nnn   skip nnn files in a forward direction
  TB nnn   translate next nnn blocks
  TF nnn   translate next nnn files
  TM       write a tape mark at the current position of the tape
  UT       toggles translation mode (between EBCDIC and ASCII)
  WH       print detailed statistics
  WR file  write the contents of filename to the tape

3 BB
 Backspaces the tape the specified number of physical blocks
 (default=1).  This command will not back up before the beginning
 of the current file. 

3 BF
 Backspaces the tape the specified number of files.  A file is
 counted for each tape mark sensed (or until beginning of tape is
 reached).  The tape is then positioned just past the last tape mark
 sensed (unless at BOT).  Therefore, the command "BF 1" (or just
 "BF") will position the tape at the beginning of the current file,
 not at the previous file.  To go back to the beginning of the
 previous file, you have to give it the command "BF 2". 

3 BL
 Sets the physical blocksize of records read on the tape to the size
 specified.  The maximum blocksize is currently set at 16000 bytes
 (this can be changed by modifying and recompiling the program).  If
 a block of less than the specified size is read, then a warning
 message is printed.  If a block larger than the specified size is
 read, then the block is truncated and  a warning message is
 printed. 

3 FI
 Allows the user to send the output to another file rather than to
 the terminal.  The filename may be up to 40 characters in length,
 and can be a logical name, which will be properly translated.  If
 the command "FI" is given without a parameter, output reverts to
 the terminal.  This command will close any output file that was
 opened by a previous FI command.  The output file is given the
 defaults ORGANIZATION='SEQUENTIAL', CARRIAGECONTROL='LIST', and
 STATUS='NEW'. 

3 HE
 Prints this text.

3 LR
 Use this command to set the logical record size of the blocks on
 the tape.  LR must be less than or equal to BL, and if not
 specified, defaults to the previous value given by an LR command,
 or the value of the last BL command, if LR is greater then the
 current blocksize.  When ETAPE reads a physical block on the tape,
 it will break the block into records equal in length to the value
 specified as the parameter of this command.  It is not required that
 the blocksize be an even multiple of LR; if that is not the case,
 then the last record will be shorter than the others. 

3 QU
 Rewinds the tape and exits the program.  All open files are closed.

3 RW
 Rewinds the tape.  All else remains unchanged.

3 SB
 Use this command to skip forward a specified number of blocks on
 the tape.  This command will not skip past the end of a file, or
 past the end of the tape.  Default is to skip 1 block. 

3 SF
 Use this command to skip forward a specified number of files on the
 tape.  The default is 1 file, which will position you at the
 beginning of the next file on the tape.  Will not go past end of
 tape.  A file on tape is delimited by tape marks (this program knows
 nothing about labels; labels are treated just as regular files on
 the tape). 

3 TB
 Translates the next nnn blocks and displays them at the terminal,
 or writes them to a file, as the user has requested previously.
 This command stops when it encounters the end of a file (but the
 output file is not closed, so you can reposition the tape and send
 another file to the same output file).  The form of the command
 "TB *" translates all remaining blocks in the file currently
 positioned at. 

3 TF
 Translates the next nnn files, sending output to the terminal or
 to a file, as the user has previously specified.  The form "TF *"
 translates all remaining files on the tape, concatenating them and
 merging them to the output file.  Stops upon reaching the end of the
 tape. 

3 TM
 Writes a tapemark on the tape at that point.  Read access beyond the
 tapemark is then prohibited.  Note that the WR command already
 writes its own tapemark at the end of every file written to the
 tape. 

3 UT
 Causes translation to be toggled between ASCII and EBCDIC.
 Initially, the switch is set to do translation from EBCDIC.  A UT
 command turns off the translation and a subsequent UT command will
 turn it back on.  The WH command will tell you what mode you are in.

3 WH
 Prints detailed tape statistics (tape position, output file and 
 number of blocks written, blocksize and record length, etc).

3 WR
 Writes the contents of the file specified to the tape, in whatever
 format (ASCII or EBCDIC) is currently in use.  The current values of
 lrecl and blocksize are used to block the records for output.  This
 will also write a tapemark after the end of file.  Short records are
 padded with blanks, long records are truncated (with a warning
 message), and the last block written may be shorter than the other
 blocks (but an integral multiple of lrecl). 

