1 FILTER
The FILTER program reads an ASCII file and writes a new file with various
user-specified transformations performed.  The transformations consist of
replacement of a string or series of strings with an alternate string.
Builtin options are provided for capitalization, conversion to lower case,
removal of tabs, removal of ASCII control codes, and replacement of ASCII
control codes.

User-specified string replacements may be entered from a file or the
keyboard.

Enter:       FILTER in_file_list [out_file_list]

Where 'in_file_list' may be a single filespec, a list of filespecs
separated by commas, or a wildcard file specification.  The optional
'out_file_list' must either be a single filespec, or of the form "*.type";
i.e., a wildcard specification for the filename, with a user-specified
file type.  The output filename will then be the same as the input
filename, with the specified type.  FILTER will refuse to process files
with certain attributes (e.g., executables, libraries, etc.).

If "out_file_list" is omitted, the output file(s) will be new versions of
the input file(s).
2 /ASCII
Convert strings representing ASCII control characters (such as created by
the /DEASCII option) into the actual control characters.
2 /CAPS
Capitalize all lower case characters.
2 /DEASCII
Convert ASCII control characters into readable/printable strings
representing those characters.  Characters in the lower 128 are
represented by their standard, ASCII mnemonic (e.g., <ESC> for the
escape character -- number 27); characters in the upper 128 are replaced
by the number (e.g., <202>).
2 /EXACT
If /EXACT is specified, the case of the "from" strings must match the 
case of the string in the file exactly or they will not be replaced.
If not specified, case is ignored for matching purposes.

Whether or not /CASE is specified, the case of the "to" string will be
unchanged if it is inserted into the output file.
2 /EXCLUDE
Excludes a file or list of files from processing when a wildcard was
used for the input list.  For example:

    FILTER/CAPS/EXCL=*.TXT *.*
2 /FILE=filespec
Read a sequence of strings from the specified file with the replacement
string.  Entries should be made two per line.  If the string contains
spaces, the string must be enclosed in double quotation marks.  Use two
consecutive double quotation marks in a quoted string to include a 
literal double quote.  A string may be deleted by using two consecutive
quotes as the replacement.

Examples:

      ABC       Abc
      ???       "Hello Dolly"
      "/?"      "Says who?"
      """"      "'"
      It"s      It's
3 <EDIT>
If the replacement string is specified as <EDIT> (note: must be all 
caps), then instead of replacing the found string with the text "<EDIT>",
you are placed into the line editor to change the string.  There is no
way (at present) to use <EDIT> as the replacement string; <Edit> or <edit>
would be legal.  The line editor accepts the following commands:

   Right Arrow, Left Arrow - move within string
   ^A - toggle insert/overstrike mode
   ^C - cancel changes (restore unmodified string)
   ^E - move to end of string
   ^G,Remove - delete character under the cursor
   ^H,BackSpace - move to beginning of string
   ^I,Tab - move to next word
   ^M,Return,^Z - save changes and go to next 
   ^R,^W - repaint the string
   ^U - delete from cursor to beginning of string
   Del - delete character to left of cursor
2 /KEYBOARD
Read a sequence of strings from the keyboard with the replacement
string.  Entries should be made two per line.  If the string contains
spaces, the string must be enclosed in double quotation marks.  Use two
consecutive double quotation marks in a quoted string to include a 
literal double quote.  A string may be deleted by using two consecutive
quotes as the replacement.  End your input with a control/Z character.

Examples:

      ABC       Abc
      ???       "Hello Dolly"
      "/?"      "Says who?"
      """"      "'"
      It"s      It's
      ^Z
3 <EDIT>
If the replacement string is specified as <EDIT> (note: must be all 
caps), then instead of replacing the found string with the text "<EDIT>",
you are placed into the line editor to change the string.  There is no
way (at present) to use <EDIT> as the replacement string.  The line 
editor accepts the following commands:

   Right Arrow, Left Arrow - move within string
   ^A - toggle insert/overstrike mode
   ^C - cancel changes (restore unmodified string)
   ^E - move to end of string
   ^G,Remove - delete character under the cursor
   ^H,BackSpace - move to beginning of string
   ^I,Tab - move to next word
   ^M,Return,^Z - save changes and go to next 
   ^R,^W - repaint the string
   ^U - delete from cursor to beginning of string
   Del - delete character to left of cursor
2 /LOG
Echo each line as it is changed.
2 /LOWER
Convert all capitals to lower case.
2 /UNTAB
Replace tabs with spaces so that the next character is in the next
column equally divisible by 8.  Note that this is the default for the
system editor.  A more flexible means of replacing tabs is provided
by the /AT and /EVERY qualifiers.
3 /AT
Set tab stops AT the specified locations.

 /AT=(n,n,n,n,n...)
3 /EVERY
Set tab stops EVERY N columns.

 /EVERY=n
3 /FORTRAN
Set tab stops at 7,10,13,... and interpret the input as alternate format
FORTRAN source code.  See "Programming in VAX FORTRAN" for details.

Note: overrides /EVERY and /AT.
2 /VERIFY
Echo each line as it is changed.  (Same as /LOG).
2 /ZBIT
Zeros the eighth bit of all characters.
2 Control_Characters
Control characters are denoted by the up arrow (^) character leadin
(e.g., ^G).  If you wish to use an up arrow to represent itself (i.e.,
not as a control leadin), enter two consecutive up arrows.
2 Double_Quotes
Double quotes may be entered in a quoted string by entering two consecu-
tive double quotes.  In unquoted strings, either approach works.

 Examples:

        Valid                                Not Valid

 "This is a quote ("") character"        "Bad quote (") example"
  This""works
  Sodoes"this
2 Examples
The following commands would be valid:

      FILTER/LOWER *.DAT *.NEW
      FILTER/CAPS A.DAT,B.TXT *.OUT
      FILTER/UNTAB *.TXT
      FILTER/ASCII ABC.DAT XYZ.DAT

The following would be invalid commands:

    FILTER/LOWER *.DAT A.NEW   -  'out_file_list' requires a wildcard
                                   list when 'in_file_list' is a list
    FILTER/ASCII A.DAT,B.DAT A.NEW,B.NEW
                               -  cannot specify a full list for output;
                                   use a wildcard instead.
2 Gotcha
The order in which conversions are entered is significant if it results
in multiple conversions.  Capitalization, lowercase, and untabbing are 
performed BEFORE any other conversions.  Ascii, Deascii, and eighth bit 
stripping are performed before string replacement transformations.
