From:	CSBVAX::MRGATE!@KL.SRI.Com,@wiscvm.wisc.edu,@YMIR.BITNET:PORTIA@ENGVAX.SCG.HAC.COM@SMTP 30-JUL-1987 02:31
To:	EVERHART
Subj:	VFE  source (5/5) reposted...

Received: from wiscvm.wisc.edu by KL.SRI.COM with TCP; Tue 28 Jul 87 02:59:41-PDT
Received: from YMIR.BITNET by wiscvm.wisc.edu ; Tue, 28 Jul 87 04:57:36 CDT
Received: from ENGVAX.SCG.HAC.COM by YMIR.BITNET; Tue, 28 Jul 87 02:38 PDT
Date: Mon, 27 Jul 87 19:11 PDT
From: Portia 616-2635 <@YMIR.BITNET:PORTIA@ENGVAX.SCG.HAC.COM>
Subject: VFE  source (5/5) reposted...
To: info-vax@sri-kl.ARPA
X-VMS-To: INFO-VAX-SUBMIT

$ show default
$ check_sum = 1132276786
$ write sys$output "Creating VFE.RNH"
$ create VFE.RNH
$ DECK/DOLLARS="$*$*EOD*$*$"
..lm 0 .rm 76
1 ALPHA
..br
The ALPHA command is used to display in either ASCII or EBCDIC
depending on the current SET CHARSET mode.  Operation is identical
to the ASCII and EBCDIC commands in all other respects.  The default
mode is ASCII.
..bl
Format:
..bl .lm +3
   A(LPHA)[/P(ASTE)]  [range]
..bl .lm +3
      See ASCII or EBCDIC for parameter specification.
..br .lm -6
1 ASCII
..br
The ASCII command is used to display the contents of the current
buffer (plus following blocks, if specified) in ASCII.  Non-printing
characters are shown as periods.  There are 64 or 96 characters/line.
Output is aligned on quadword boundaries.
..bl
Format:
..bl .lm +3
   AS(CII)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 ADD
..br
The ADD command is used to add one or more signed numbers (longwords)
and display the result in decimal and hex.  The numbers can be given
in hex, decimal, or octal.  Decimal output is normally signed unless
the SET#NOSIGN command has been given.
..br
Format:
..bl .lm +3
   AD(D)  number1[,number2,...,numbern]
..lm +12
..p -9;[number] can optionally have a leading + or - sign and can
               have one of the following formats:
..bl .lm -6
         nnnnnnnnn - Decimal
..bl
         0nnnnnnnnnn - Octal
..bl
         Hnnnnnnnn - Hex ("H" must be used regardless of the current radix)
..br .lm -9
1 BINARY
..br
This command is used to display the contents of the current buffer (plus
following blocks, if specified) in binary format.  There are 8 or 12
bytes/line.  Output is nonaligned (starts at the first address given).
..bl
Format:
..bl .lm +3
   B(INARY)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 CHANGE
..br
The CHANGE command is used to modify the current buffer.  (This
does not alter the file unless the WRITE command is used with the changed
buffer).  If the change-string would overflow the buffer, nothing is changed.
..bl .lm +3
   C(HANGE)  [begin[,change-string]]
..lm +11
..p -8;[begin] if numeric, is the first byte to change.  An asterisk (*) can
              be used if the current buffer contains a found target of a
              previous LOCATE, in which case the target address is used.
..p -8;[change-string] can have one of the following formats:
..lm +3
..p -8;   nnnnn - Unsigned hex string of numbers.  These are placed in
                 the buffer in the order given, right-justified to the
                 nearest byte.  Any number of leading zeroes and up to
                 8 significant digits may be used.
..p -8,0; +nnnn
..p -8;   -nnnn - Signed decimal.  Can be byte, word, or longword.  Context
                 is determined by the size of the number, including leading
                 zeroes.  Stored in normal (reversed) format.
..p -8,1; "xxx" - Character string.  Single or double quotes are permitted.
                 The character set used is specified by SET CHARSET.  ASCII
                 is assumed if none is specified.
..bl .lm -11
      If [change-string] is omitted, the previous change string is used.  If
      both parameters are omitted, the previous string is used at the last
      found target address within the current buffer.
..br .lm -6
1 CUT
..br
The CUT command copies all or part of the current buffer into the paste buffer.
This is secondary buffer which can be recopied into the current buffer at any
time via the PASTE command or compared with it via the DIFFERENCES command.
See HELP BUFFERS for more information.
..bl
Format:
..bl .lm +3
   CU(T)  [range]
..bl .lm +3
      [range] must be entirely within the current buffer.  If only the
      beginning byte is specified, that address thru the end of the current
      buffer is copied.  If [range] is omitted, the entire contents of the
      current buffer are copied.
..bl
      Data within the paste buffer always begins at byte 0.  The range used
      with the last CUT command is saved, however, and used as a default for
      subsequent uses of the data (DIFFERENCES and PASTE).
..br .lm -6
1 DIFFERENCES
..br
This command compares all or part of the paste buffer, beginning at the first
byte, with the specified range within the current buffer.  If differences are
found, the contents of the current buffer are printed (in hex) with the
corresponding contents of the paste buffer directly below.  32 or 48 sequential
bytes are displayed per line.  Matching paste buffer bytes on the second line
are displayed as periods.  Output is longword-aligned.
..bl
Format:
..bl .lm +3
   D(IFFERENCES)  [range]
..bl .lm +3
      [range] must be entirely within the current buffer.  If only the
      beginnning byte is specified, the comparison count defaults to the
      smaller of the paste buffer size or the remaining bytes of the
      current buffer.
..bl
      If [range] is omitted, the range given with the last CUT command which
      moved data into the paste buffer is used.
..br .lm -6
1 DATE
..br
The DATE command displays one or more sequential quadwords from the
current buffer in system date format.  Only date values which exist
entirely within the buffer can be displayed.
..bl
Format:
..bl .lm +3
   DA(TE)[/P(ASTE)]  range
..bl .lm +3
      The beginning byte of [range] must be specified.  If no count
      or ending byte is given, a single date value is displayed.
..bl
      If the /PASTE qualifier is given, data from the paste buffer
      is displayed.
..br .lm -6
1 EBCDIC
..br
The EBCDIC command is used to display the contents of the current
buffer (plus following blocks, if specified) in EBCDIC.  Non-printing
characters are shown as periods.  There are 64 or 96 characters/line.
Output is aligned on quadword boundaries.
..bl
Format:
..bl .lm +3
   EB(CDIC)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 EOF
..br
This command is useful when editing most VMS files.  The software EOF
block and EOF byte are displayed and the user is positioned at the EOF
block.  When editing devices, this command does the same thing as the
LAST command.
..bl
Format:
..bl .lm +3
   EO(F)
..br .lm -3
1 EXIT
..br
The EXIT command terminates VFE.
..bl
Format:
..bl .lm +3
   E(XIT)
..br .lm -3
1 FILE
..br
This command specifies the name of the next file or device to edit.
..bl
Format:
..bl .lm +3
   F(ILE)  [name][/qualifier(s)]
..bl .lm -3
If the file name is not given on the command line, it is solicited.  At this
point the previous file is closed and the new file is opened for edit.  If a
VMS disk file name is given, the user is positioned at virtual block 1 of the
new file and its contents are read into the current buffer.
..bl
If a disk device is specified, the user is positioned at logical block 0.
LOG__IO privilege is required to edit a disk device.
..bl
If a tape device is specified, the tape is rewound and the user is posi-
tioned at the first block of the tape.  The tape must be mounted FOREIGN.
..br .rm -2
2 /NOREWIND
..br
This qualifier can be used to specify that the tape being edited should
not be rewound.  A single read operation is performed at the current
tape position and the block number is set to zero.
..br
2 /OVERRIDE
..br
This qualifier is used to override a file interlock when editing a VMS
disk file.  It cannot be used in conjunction with /WRITE.
..br
2 /POSITION
..br
This qualifier is used  to pre-specify a tape position.  The /NOREWIND
qualifier is assumed when /POSITION is given when editing a tape.
..bl .lm +3
   /POSITION=([file:]block)
..bl .lm +3
      [file] is optional.  If not given, it defaults to one.
..bl
      [block] must be specified.  The tape is backspaced one block
      and a single read is done.  In this way, the tape remains
      positioned at the same location as it was before.  When editing
      a tape that was previously examined with VFE and the position
      is unchanged, use the same file and block numbers that were last
      shown for the tape.
..bl
      Parenthesis are used only if both parameters are given.
..br .lm -6
2 /WRITE
..br
This qualifier allows subsequent use of the WRITE command.  If not given
when the file is opened, the file will be in read-only mode and no changes
will be allowed.  Only VMS disk files and disk devices which are mounted
FOREIGN can be modified with VFE.  Tapes and XQP-managed disk devices can
only be edited in read-only mode.  Use of the /OVERRIDE qualifier is not
allowed when /WRITE is specified.
..br .rm +2
1 GET
..br
For disk files or devices, this command reads one or more blocks (depending
on the setting of SET BUFF) into the current buffer, beginning at the block
specified, and positions the user at that block.  If the block selected is
outside the limits of the current file, the user will be left positioned
at the same block and the current buffer will remain unaffected.  For tape
files, the read will always be attempted.  Tape movement stops when an
end-of-file mark is encountered in either the forward or reverse direction.
..bl
Format:
..bl .lm +3
   G(ET)  block
..bl .lm +3
      [block] is specified in decimal numeric.
..bl .lm -6
See HELP POSITIONING for an abbreviated form of GET.
..br
1 HEX
..br
The HEX command is used to display the contents of the current buffer
(plus following blocks, if specified) in hexadecimal.  There are 32
or 48 bytes/line.  Display output is aligned on longword boundaries.
Bytes are dumped in the order in which they occur in the file, from
left to right.
..bl
Format:
..bl .lm +3
   H(EX)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 IBYTE
..br
This command is used to display the contents of the current buffer
(plus following blocks, if specified) in integer byte format.  Values are
signed unless the SET NOSIGN command has been given.  There are 16 or 24
bytes/line.  Output is nonaligned (starts at the first address given).
..bl
Format:
..bl .lm +3
   I(BYTE)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 IWORD
..br
This command is used to display the contents of the current buffer
(plus following blocks, if specified) in integer word format.  Values are
signed unless the SET NOSIGN command has been given.  There are 8 or 16
words/line.  Words are displayed in normal (reverse) order - the first
byte of each 2-byte word pair is assumed to be least significant.
..bl
Format:
..bl .lm +3
   IW(ORD)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.  Words which
      span blocks are printed normally.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 ILONG
..br
This command is used to display the contents of the current buffer (plus
following blocks, if specified) in integer longword format.  Values are
signed unless the SET NOSIGN command has been given.  There are 4 or 8
longwords/line.  Longwords are displayed in normal (reverse) order - the
first byte of each 4-byte longword is assumed to be least significant.
..bl
Format:
..bl .lm +3
   IL(ONG)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.  Longwords which
      span blocks are printed normally.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 LOCATE
..br
This command is used to find the next occurrence of a target string
or number within the file being edited.
..bl .lm +3
   L(OCATE)  [target]
..lm +12
..p -9;[target] is the target string or number.  If not specified, the
               previous target is used.  The following formats are allowed:
..lm +2
..p -8;   nnnnn - Unsigned hex string of numbers.  These are searched for
                 in the order given, right-justified to the nearest byte.
                 Any number of leading zeroes and up to 8 significant
                 digits may be used.
..p -8,0; +nnnn
..p -8;   -nnnn - Signed decimal.  Can be byte, word, or longword.  Context
                 is determined by the size of the number, including leading
                 zeroes.  Searched for in normal (l.s.#to m.s.) format.
..p -8,1; "xxx" - Character string.  Single or double quotes are permitted.
                 The character set used is specified by SET CHARSET.  ASCII
                 is the default.  String locate operations are case sensitive
                 unless the SET NOCASE command has been given.
..br .lm -17
1 LGLOBAL
..br
This command finds all of the remaining occurrences of the target number
or string within the file being edited.
..bl
Format:
..bl .lm +3
   LG(LOBAL)  [target]
..bl .lm +3
      [target] is specified exactly as with LOCATE.
..bl
      When an entire disk file or device has been searched, the user is
      repositioned at the block where the search began.  When using tape,
      the position is left at the last block within a logical file.
..br .lm -6
1 LAST
..br
This command positions the user at the highest allocated block of the file.
Due to minimum extent granularity, this may be higher than the last block
currently storing user data.  As a result, its contents may be meaningless -
this should not be taken as a sign of file corruption.
..bl
When using tape, the user is positioned at the last block within the
current logical file.
..bl
Format:
..bl .lm +3
   LA(ST)
..br .lm -3
1 MULTI
..br
This command is used to display the contents of the current buffer (plus
following blocks, if specified) in hex and character format.  The character
set used is determined by SET CHARSET (ASCII is the default).  Non-printing
characters are shown as periods.  There are 32 or 48 bytes displayed per
line, with the hex values displayed beneath and aligned with the characters.
Output is aligned on longword boundaries.
..bl
Format:
..bl .lm +3
   M(ULTI)[/P(ASTE)]  [range]
..bl .lm +3
      [range] must begin within the limits of the current buffer.  If it
      overflows beyond the current buffer, subsequent blocks are dumped,
      and the user is positioned at the last block read.
..bl
      If [range] is omitted, the current buffer is dumped in its entirety.
..bl
      If the /PASTE qualifier is used, the paste buffer is displayed.  In
      this case, [range] must not overflow the size of the paste buffer.
      If omitted, the entire paste buffer is displayed.
..br .lm -6
1 MOVE
..br
This command moves a tape in the forward or reverse direction past a
specified number of end-of-file marks.
..bl
Format:
..bl .lm +3
   MO(VE)  [offset]
..lm +12
..p -9;[offset] is a decimal numeric with optional + or - sign.  If omitted,
               the number one (1) is assumed, which will position forward
               to the next end-of-file mark on the tape.  Reverse direction
               is indicated by a negative offset.
..br .lm -15
1 NEXT
..br
This command positions the user to a block with a relative offset to the
current block.  Contents of the requested block or blocks, depending on the
setting of SET BUFF, are read into the current buffer.  When using tape,
tape movement stops when an end-of-file marker is encountered prior to
locating the requested block.
..bl
Format:
..bl .lm +3
   N(EXT)  [offset]
..lm +12
..p -9;[offset] is a decimal numeric with optional + or - sign.  If omitted,
               the number one (1) is assumed, which will position to the
               block immediately following the current block.
..bl .lm -15
When editing a disk file or device, the value of [offset] is usually
multiplied by the value determined by SET BUFF.
..bl
See HELP POSITIONING for abbreviated forms of NEXT.
..br
1 PASTE
..br
The PASTE command writes all or part of the paste buffer to the current
buffer.  File positioning is not affected, and if a WRITE command is issued
before another command causes a read, the positioned block(s) within the
file will be overwritten.  Judicious use of the CUT and PASTE commands can
be used to transfer "chunks" of data within a single file or group of files.
EXTREME CAUTION is advised for users of this command!
..bl
Format:
..bl .lm +3
   P(ASTE)  [range]
..bl .lm +3
      Data is transferred sequentially from the first byte of the paste
      buffer into the specified area of the current buffer.  [range] must
      be entirely within the current buffer.  If a range exceeds the size
      of the paste buffer, the remainder is zero-filled.  If it is smaller,
      only that many bytes are transferred.
..bl
      If only the beginning byte of [range] is given, the transfer count
      is taken to be the size of the paste buffer.  If [range] is omitted
      entirely, the range given with the last CUT command is used.
..bl
      The size of the current buffer is never changed by the PASTE command.
..br .lm -6
1 RECORD
..br
The RECORD command is used to display one or more records of a sequential
file in character format, as determined by SET CHARSET.  ASCII is the
default.  Nonprinting characters are printed as periods.  The file can
be either fixed, variable, or VFC formatted.  There are two display modes,
as determined by SET HEADER.
..bl .lm +3
   R(ECORD)  [begin][,count]
..bl .lm +3
      [begin] for fixed length records is the byte offset within the current
      buffer of the first record to print.  For variable/VFC records, it is
      the address of the record length word for that record.  Since all rec-
      ords begin on a word boundary, if [begin] is odd, it will round up.
..bl
      If [begin] is omitted and the user is positioned at the same block
      where a previous RECORD command was given, the address of the following
      record is used.  Otherwise, if [begin] is omitted, the current buffer
      is searched for the first likely record start address and that is used.
      (This process is not 100% accurate, but works well with short records.)
..bl
      [count] is the count of records to be printed.  If [count] and/or the
      record lengths are sufficiently large, processing may continue into
      blocks following the current buffer.  When processing is completed,
      the user is positioned at the last block read.  If not specified,
      [count] defaults to the previous value used.
..br .lm -6
1 REWIND
..br
This command rewinds the tape being edited and positions the user at the
first block of the first file.
..bl
Format:
..bl .lm +3
   RE(WIND)
..br .lm -3
1 SET
..br
This command is used to set/clear various modes and indicators.
..br .rm -2
2 BUFF
..br
This option determines the size of the current buffer for disk operations.
..bl
Format:
..bl .lm +3
   S(ET)  B(UFF)=count
..bl .lm +3
      The [count] parameter is a decimal numeric in the range of 1-50 and
      must be specified.  This determines the block count for each read
      operation.  Large buffer sizes can be used to transfer data that
      crosses block boundaries with CUT and PASTE, and to compare large
      areas with the DIFFERENCES command.  The default value of [count] is
      one (1), and it is recommended that this value be used for most VFE
      operations.  When a large buffer size is used, addressing is relative
      to the first block read, and this can be confusing when data is
      displayed from subsequent blocks which reside in the same buffer.
..bl
      Note that if [count] exceeds the block size of the current buffer,
      the size will not be expanded until the next read is performed.
..bl
      The setting of this parameter has no effect on the efficiency of
      LOCATE or LGLOBAL, which always use a 50-block buffer for disk searches.
..br .lm -6
2 CASE
..br
This option determines whether character string search operations
(LOCATE, LGLOBAL) are case-sensitive.  Case-sensitive searches require
less than 50% of the CPU time required by case-insensitive searches.
The default mode is case-sensitive.  Operation is valid for either
supported character set (ASCII or EBCDIC).
..bl
Format:
..bl .lm +3
   S(ET)  [NO]C(ASE)
..bl .lm +3
      CASE mode is case-sensitive, NOCASE is case-insensitive.
..br .lm -6
2 CHARSET
..br
This option is used to determine the character set used for display,
change, and search operations.  The default character set is ASCII.
..bl
Format:
..bl .lm +3
   S(ET) CH(ARSET)=A(SCII)
..br
   ###############=E(BCDIC)
..br .lm -3
2 DISPLAY
..br
This option is used to enable or disable local printing at the terminal.
The standard mode is DISPLAY.  If logging is enabled (see SET LOG) and
the SET NODISPLAY command has been given, only command solicitation and
single-line output (such as error messages) is displayed at the terminal.
Other output is written only to the log file.
..bl
Format:
..bl .lm +3
   S(ET)  [NO]DISPLAY
..br .lm -3
2 HEADER
..br
This option controls the output format of the RECORD command.
..bl
Format:
..bl .lm +3
   S(ET)  [NO]H(EADER)
..bl .lm +3
      HEADER mode is the default.  Each record is preceded by its starting
      address, and by up to 8 bytes of its VFC field (in hex) for VFC files.
      When a new block is read, the block number is shown, as for other
      display formats.  Nonprinting characters are replaced with periods.
..bl
      NOHEADER mode produces output similar to the VMS TYPE command.
      Addresses, VFCs, and block numbers are suppressed.  Nonprinting
      characters are replaced with periods, except for tabs, which are
      replaced with the correct number of spaces.
..br .lm -6
2 LOG
..br
This option is used to enable or disable logging of VFE output to a user
file.  All output and input is written to the file.  The log file is
closed when another SET LOG command is given or when VFE terminates.
..bl
Formats:
..bl .lm +3
   S(ET)  L(OG)[=filename]
..br
   S(ET)  NOL(OG)
..lm +14
..p -11;[filename] is any legitimate VAX file descriptor.  Device and
                 directory are optional.  If this parameter is omitted
                 entirely, the file VFE.LOG is created in the current
                 default directory.  A new version is created each time
                 the SET LOG command is used.
..br .lm -17
2 POSITION
..br
This option is used to change the indicated position of a tape file.
It does not change the physical position of the tape or do any I/O to
the tape device.
..bl
Format:
..bl .lm +3
   S(ET)  P(OSITION)=([file:]block)
..lm +10
..p -7;[file] if specified, is a decimal numeric which replaces the
             current file number.
..lm +1
..p -8;[block] is required.  It is a decimal numeric, and replaces the
              current block number.
..bl .lm -8
      Parenthesis are used only if if both parameters are given.
..br .lm -6
2 RADIX
..br
This option determines the base of all byte addresses given on command
lines and shown in display output.  The [begin] and [end] fields of
all range specifications and the [begin] field of the CHANGE command
are affected.  Block addresses and the [count] field of ranges are
not affected - these are always input and displayed in decimal.  The
initial radix is DECIMAL.
..bl
Format:
..bl .lm +3
   S(ET) R(ADIX)=D(ECIMAL)
..br
   #############=H(EX)
..br .lm -3
2 SIGN
..br
This option is used to enable or disable signed decimal output with
the ADD, IBYTE, IWORD, and ILONG commands.  The default mode is
SET SIGN.
..bl
Format:
..bl .lm +3
   S(ET)  [NO]S(IGN)
..br .lm -3
2 SKIP
..br
This option can be used to compensate for a bug in VMS which causes
incorrect block indication when using tape files.  It is known to occur
under VMS 4.1 and 4.2 when using the TA78 tape drive.  Simply put, when
an IO$__SKIPRECORD encounters an EOF mark, the number of blocks skipped
before the EOF was found is not returned in the IOSB.  This means that
if the tape encounters an EOF while skipping in the forward direction
and the user backs up over the EOF, the absolute block number is unknown.
Note that IO$__SKIPRECORD is only used with block positioning within a
single file (GET, NEXT, TOP, LAST, EOF).  When using the MOVE command,
the setting of SKIP has no effect.
..bl
Format:
..bl .lm +3
   S(ET)  SK(IP)=option
..bl .lm +3
      If [option] is NORMAL, VFE uses its standard skip-ahead count of
      up to 50 blocks when skipping over blocks.  When moving back over
      an EOF, block numbering can be unpredictable if operating on a
      system and device on which this bug exists.
..bl
      If [option] is FAST, the skip-ahead count is still up to 50 blocks,
      but movement backwards over an EOF will set the block number to -1
      and decrement from there if the bug could have caused erroneous
      position indication.
..bl
      If [option] is SLOW, all skip-aheads are done one block at a time.
      This preserves position indication but operates considerably
      slower than either of the above.
..bl
      In the hope that VFE will be around long after this bug is fixed,
      the default SKIP option is NORMAL.
..br .lm -6
2 WIDTH
..br
This option can be used to change the output width of the terminal on
which VFE is operating.  Display output has a wide and a narrow setting,
and the size is dependent on the terminal output width.  Output to a
log file when NODISPLAY is set, and all batch output, is always in
wide format.  If the width is changed during a VFE session, it is reset
to the original size when the session terminates.
..bl
Format:
..bl .lm +3
   S(ET)  W(IDTH)=size
..bl .lm +3
      [size] is a decimal numeric and can be either 80 or 132.
..br .lm -6 .rm +2
1 SHOW
..br
The SHOW command is used to display various aspects of the current
VFE environment.
..br .rm -2
2 ALL
..br
This displays all of the SHOW options with one command.
..bl
Format:
..bl .lm +3
   SH(OW)  A(LL)
..br .lm -3
2 CHANGE
..br
Displays the current change-string, and most recently changed file, block
and byte address.
..bl
Format:
..bl .lm +3
   SH(OW)  C(HANGE)
..br .lm -3
2 DEVICE
..br
Displays the name of the file or device being edited, and current block
number.  Same as SHOW FILE.
..bl
Format:
..bl .lm +3
   SH(OW)  D(EVICE)
..br .lm -3
2 FILE
..br
Displays the name of the file or device being edited, and current block
number.
..bl
Format:
..bl .lm +3
   SH(OW)  F(ILE)
..br .lm -3
2 LOCATE
..br
Displays the current locate target and most recently located file, block,
and byte address for the target.
..bl
Format:
..bl .lm +3
   SH(OW)  L(OCATE)
..br .lm -3
2 MODES
..br
Displays status of the SET modes (BUFF, CASE, CHARSET, DISPLAY, HEADER,
LOG, RADIX, SIGN, SKIP, WIDTH).
..bl
Format:
..bl .lm +3
   SH(OW)  M(ODES)
..br .lm -3
2 PASTE
..br
Displays the size of the paste buffer, and the file, block, and offset
from which the data was transferred.
..bl
Format:
..bl .lm +3
   SH(OW)  P(ASTE)
..br .lm -3 .rm +2
1 TOP
..br
This command positions the user at the top of the file (virtual block 1).
The contents of virtual block 1 are read into the current buffer (logical
block zero for disk devices).  For tape, the tape is moved in reverse until
an end-of-file mark is found and positioned directly following the EOF mark.
..bl
Format:
..bl .lm +3
   T(OP)
..br .lm -3
1 WRITE
..br
This command writes the current buffer to the file block(s) at which the
user is positioned.  The current buffer will always contain the contents
of the positioned block(s) except when the CHANGE or PASTE commands have
been used and no repositioning has occurred.  The amount of data written
depends on the size of the current buffer, which is usually 512 times the
value determined by SET BUFF.  See HELP BUFFERS for more information.
..bl
The WRITE command can only be used when editing disk files or FOREIGN
mounted disk devices, and only if the /WRITE qualifier was given when
the file or device was accessed.
..bl
Format:
..bl .lm +3
   W(RITE)
..br .lm -3
1 buffers
..br
VFE operates with two variable-length buffers.
..bl .lm +3
   The CURRENT buffer is filled with the contents of the positioned block,
   plus one or more following blocks if editing a disk file or device and
   if the SET BUFF value exceeds 1.  The buffer is filled whenever a
   file is initially opened for edit and whenever a read operation is
   performed on the current file or device.  Commands which always cause
   a read operation are EOF, FILE, GET, LAST, MOVE, NEXT, REWIND, and TOP.
   (This happens even if the same block is selected, as in NEXT 0).  Commands
   which can cause file reads if multiple blocks are processed are ALPHA,
   ASCII, BINARY, EBCDIC, HEX, IBYTE, IWORD, ILONG, LOCATE, LGLOBAL, MULTI,
   and RECORD.  Contents of the current buffer can be modified with the
   CHANGE and PASTE commands, and these modifications remain until the
   next read operation.  If a WRITE is done before the next read, the
   modifications are written to the file and become permanent.
..bl
   The PASTE buffer is user-controlled.  It is filled by using the CUT
   command.  Unlike the current buffer, the paste buffer remains unaltered
   when a read operation occurs or when a new file is edited.  The paste buffer
   has two primary uses:  First, to allow data to be compared with the
   DIFFERENCES command, and second, to permit data to be transferred within
   a file or between files.
..br .lm -3
1 positioning
..br
The following sequences are abbreviated formats of the GET and NEXT
commands.  They are useful for fast block positioning.  Note that a
positioning command will always cause the contents of the positioned
block(s) to be read into the current buffer.
..bl .lm +3
   <CR>###### advances one block.  Same as NEXT 1.
..br
   +######### advances one block.  Same as NEXT 1.
..br
   -######### backs up one block.  Same as NEXT -1.
..br
   [number]## positions to the block specified.  Same as GET [number].
..br
   +[number]# advances [number] blocks.  Same as NEXT [number].
..br
   -[number]# backs up [number] blocks.  Same as NEXT -[number].
..bl .lm +3
      In all cases above, [number] represents a decimal numeric.
..bl .lm -6
See HELP PROMPT for information on position indication.
..br
1 prompt
..br
The user prompt has several different formats, depending on the type of file
or device being edited and on the SET BUFF value.  The general format is:
..bl .lm +3
   [file:]block[(size)]>
..bl .lm +3
      [file] represents the current logical file number and is always
      present for tapes, never for disk.  When the tape is rewound and
      the file position is known, the first logical file is numbered 1
      and the number is increased each time an EOF mark is crossed.
      When the tape position is unknown, the file number can be zero
      or negative.
..bl
      [block] is always present.  For disk files, it represents the current
      VBN (virtual block number), for disk devices, the current LBN.
      For tape, it represents the logical block number that has been most
      recently read within the current logical file.  When the tape
      position is known, blocks begin at 1 with zero indicating that an
      EOF mark has just been crossed but no data has been read.  When the
      tape position is unknown, the block number can go negative.
..bl
      [size] is used to show the size of the current buffer.  For disk,
      this indicator is omitted if the value of SET BUFF is one.  In this
      case, the current buffer contains 512 bytes.  For tape, this shows
      the size of the block just read, and is always present except when
      the last tape positioning produced no data, as is the case when an
      EOF mark has been crossed or if the system returns an error status
      with zero bytes transferred.
..br .lm -6
1 range
..br
Many of the commands use a [range] specification.  The format of the range
is as follows:
..bl .lm +3
   [begin][,count]  or:
..br
   [begin][:end]
..lm +11
..p -8;[begin] specifies the address within the buffer of the first byte to
              process.  It is supplied in unsigned decimal or hex, depend-
              ing on the setting of SET RADIX.  The default is decimal.
              [begin] must always be within the address range of the cur-
              rent or paste buffer, whichever is being used in the command.
              If not specified, [begin] defaults to the first byte (0).
..p -8;[count] specifies the count of items to process.  This is the byte
              count for all commands except for DATE, IWORD, and ILONG,
              where it it the count of date quadwords, words, and longwords,
              respectively.  [count] is always specified in unsigned decimal
              numeric.  Some commands allow [begin+count] to exceed the
              range of the current buffer.
..p -8;[end]## specifies the address of the last byte to process.  It can be
              supplied in unsigned decimal or hex, depending on SET RADIX.
              Decimal is the default.  [count] and [end] cannot be used
              together on the same command.  Some commands allow [end] to
              exceed the range of the current buffer.
..bl .lm -8
      If both [count] and [end] are omitted, a single item is processed,
      except where indicated differently for specific commands.  Most com-
      mands allow [range] to be omitted entirely.  See specific command
      documentation for more information.
..br .lm -6
1 signon
..br
If you have the symbol VFE defined correctly as specified in the release
documentation, following is the full format of the signon sequence:
..bl .lm +3
   $ VFE[/set-options]  [filename][/file-qualifiers]
..bl .lm +3
      [set-options] are optional, and can be one or more of the valid SET
      options, less the SET command itself.
..bl
      [filename] is the name of the file or device to edit.  If not given
      on the command line, it will be solicited.
..bl
      [file-qualifiers] are optional, and can be one or more of the options
      described with the FILE command.
..bl .lm -6
For example:
..bl .lm +3
   $ VFE/NOCASE/RADIX=HEX/LOG=FILEX.LOG  FILEX.DAT/WRITE
..br .lm -3
$*$*EOD*$*$
$ checksum VFE.RNH
$ if checksum$checksum .ne. check_sum then -
$   write sys$output "Checksum failed, file probably corrupted"
$ exit
