
  -----------------------------------------------
  Common Discussion for FIND, CHANGE, and EXCLUDE
  -----------------------------------------------

  FIND     searches a file for a character string. Strings which are
           found are highlighted. 

  RFIND(F5) repeats the last FIND using the same parameters.
   
  CHANGE   searches a file for a character string then replaces it
           with another character string. Strings which are changed
           are highlighted.

  RCHANGE(F6) repeats the last CHANGE using the same parameters.
   
  EXCLUDE  searches a file for a character string. Lines which
           contain the target string  are excluded (made non-visible).

  -----------------------------------------------------
  The basic format of FIND, CHANGE and EXCLUDE commands
  -----------------------------------------------------

  FIND     string1             [search-limits]  [direction]  [context]

  CHANGE   string1   string2   [search-limits]  [direction]  [context]

  EXCLUDE  [string1]           [search-limits]  [direction]  [context]

  ----------  
  Parameters
  ----------  

  string1

  string2  (CHANGE only)

  [col1[col2]]

  [label1 [label2]]

  [FIRST | LAST | PREV | NEXT | ALL]

  [PREFIX | SUFFIX | WORD | EOL]

  [X | NX]

  [QUIET]
      
  Parameters may be entered in any order.  However STRING1 must
  precede STRING2, LABEL1 must precede LABEL2, and COL1 must precede
  COL2.  If LABEL2 is not specified, .ZLAST is assumed.

  ----------------------
  Parameter Descriptions
  ----------------------

  STRING1 specifies the search string.

  STRING2 specifies the replacement character string.

  If asterisk(*) is specified for STRING1, the STRING1 value from
  the last FIND, CHANGE, or EXCLUDE command is used. This notation
  eliminates the need for retyping STRING1 when repeating any of
  these commands with different parameters.

  If asterisk(*) is specified for STRING2, the STRING2 value from
  the last CHANGE command is used. This notation eliminates the need
  for retyping STRING2 when repeating the last CHANGE command with
  different parameters.

  --------------
  Simple Strings
  --------------

  If a search string does not contain blanks or semi-colons, it is a
  simple string. By default, simple strings are case insensitive.
  For example:

     FIND AB

  would find any combination of the letters A and B in upper or
  lower case: AB, ab, aB, or Ab.

  -----------------
  Delimited Strings
  -----------------

  If a string contains blanks or semi-colons, it must be enclosed in
  quotes to insure proper processing. When a string is enclosed in
  single or double quotes, it is a delimited string. For example:

     FIND 'all good men'

  If single or double quotes are part of the string, it must be
  enclosed in the opposite quote type. For example:

     CHANGE  "he said 'yes'"  "he said 'no'" all
     CHANGE  '"hello all"'  '"good-bye all"'

  If you wish to specify an empty string (null), enter two adjacent
  quotes. For instance, if you want to delete all occurrences of
  "FREE" from your file, issue the following command:

     CHANGE  FREE '' ALL

  -------------------
  Exact Match Strings
  -------------------

  Exact match character strings are case sensitive. The comparison
  is made using exactly the string specified and no other. For
  example:

     FIND C'AB'

  finds AB; does not find ab, aB, or Ab.

  -----------
  Hex Strings
  -----------

  If you want to find or change hexadecimal strings, you must
  specify the hex delimiter character X followed immediately by
  hexadecimal digit pairs in quotes. For example:

     FIND X'2C'

     CHANGE x'09' x'20' all

  Also see Edit Primary Commands HEX and HEXIN for display and
  modification of hexadecimal data.

  ---------------
  Picture Strings
  ---------------

  You can search for generic characters such as "any number", or
  "any non-blank" using picture strings. A picture string is
  specified with the P prefix character followed by the picture
  string in quotes. For example, P"... picture string ...". The
  picture string may contain any combination of picture characters
  and normal text characters.

  As an example let`s say you want to find all references to error
  messages in a particular set of files and that the messages have
  the form "ERRnnn" where "nnn" is any three digit number. To find
  and display exclusively all lines containing an error message:

     EXCLUDE ALL     (make all lines invisible)
     FIND P'ERR###'  (make "ERRnnn" lines visible)

  With the foregoing example in mind, the following picture strings
  may be specified in STRING1:

  P'='

     Any character

  P'^'

     Any non-blank character (all but BLANK)

  P'.'

     Any non-ASCII character (not in set x20..x7E (BLANK to TILDE))

  P'#'

     Any numeric character (in set "0..9")

  P'-'

     Any non-numeric character (not in set "0..9")

  P'@'

     Any alphabetic character (in set "a..z, A..Z")

  P'<'

     Any lower case alphabetic character (in set "a..z")

  P'>'

     Any upper case alphabetic character (in set "A..Z")

  P'$'

     Any punctuation (not in set "0..9, a..z, A..Z")

  When picture strings are used in the CHANGE command, STRING2 must
  conform to the following rules:

  *  STRING1 and STRING2 must be the same length.

  *  STRING2 picture characters are limited to =, <, and >.

  Picture strings may be any combination of picture characters and
  normal text characters. The following command finds any string
  that:

  *  begins with a blank

  *  is followed by two numerics

  *  is followed by a blank character

  *  and ends with a non-numeric

     FIND P' ## -'

  The following command changes all characters in columns 56-60 to
  blanks:

     CHANGE p'=' ' ' 56 60 all

  The following command changes all characters to uppercase:

     CHANGE all p'=' p'>'

  -----------------------------
  Specifying a Range of Columns
  -----------------------------

  The search for STRING1 may also be limited to specified columns.
  Two numeric operands may be specified. The first specifies the
  column in which the search is to begin; the second specifies the
  column in which the search is to end. The two numbers must be
  separated by at least one blank space.

  *  If neither column1 nor column2 are specified, the search is
     limited to the current BOUNDS setting.

     See general command PROFILES or line command BNDS for details
     on setting BOUNDS.

  *  If only column1 is specified, the search is limited to that
     column for the length of string1.

  For example, the following command finds all occurrences of ABC
  anywhere between columns 1 and 30.

     FIND ABC 1 30 ALL

  The following command finds all occurrences of ABC beginning in
  column 5 exclusively.

     FIND ABC 5 ALL

  The following command changes the next occurrence of ABC in
  columns 8 to 10 to DEF.

     CHG ABC DEF 8 10

  An even more efficient way to specify the same request is

     C ABC DEF 8

  ----------------------------
  Specifying a Range of Labels
  ----------------------------

  The search for STRING1 may be limited to a specific range of
  lines. To do this, include the line labels of the first and last
  lines in the range. Both labels must be specified.  If a search is
  to be limited to a single labeled line, enter that label twice, as
  the first and last line of the range.

  Line labels are created using the "." line command.  The system
  provides some built-in labels for commonly used file positions:

  .ZF or .ZFIRST

     The first line of the file.

  .ZL or .ZLAST

     The last line of the file.

  .ZC or .ZCSR

     The cursor line.

  For example, the following command finds all occurrences of the
  word "boy" between the lines labeled .A and .B.

     FIND BOY .A .B ALL

  The following example changes the first occurrence of "this" to
  "that" between the first line of the file and the line on which
  the cursor is positioned.

     CHANGE THIS THAT .ZF .ZC

  -------------------
  Direction of Search
  -------------------

  Additional operands are provided to control the starting point and
  the direction of a search:

  FIRST

     Start at the top of data line and search forward to find the
     first string-1 match.

  LAST

     Start at the bottom of data line and search backward until a
     string-1 match is made.

  PREV

     Start at the current cursor location and search backward until
     a string-1 match is made.

  NEXT

     Start at the current cursor location and search forward to find
     the next string-1 match.

  ALL

     Start at the top of data line and search forward to find all
     matches with string-1 until the bottom of data line is reached.

  If the direction of search is forward (NEXT, ALL or FIRST
  specified), then RFIND and RCHANGE ([F5] and [F6]) moves the
  cursor forward from one occurrence of string-1 to the next.

  If the direction of search is backward (LAST or PREV specified),
  then RFIND and RCHANGE ([F5] and [F6]) moves the cursor backward
  from one occurrence of string-1 to the previous.

  If either "TOP OF DATA REACHED" or "BOTTOM OF DATA REACHED"
  messages are displayed, RFIND and RCHANGE ([F5] and [F6]) may be
  used to "wrap around" the file to search through the unsearched
  portion.

  Note: If you want to search for a string that contains one of the
  FIND/CHANGE/EXCLUDE keywords like "next" or "all", the words must
  be enclosed within quotes:

  FIND "all the king`s men"
  CHG "next time" "last time" ALL

  ------------------
  Context Constraint
  ------------------

  Normally the search string is scanned for "context free", that is,
  it is found without regard to surrounding characters. You can
  constrain the string scan to the following contexts:

  *  PREFIX, only find the string if it is preceded by blank,
     punctuation, or line start, and followed by non-blank or
     non-punctuation.

  *  SUFFIX, only find the string if it is preceded by non-blank or
     non-punctuation, and followed by blank, punctuation, or line
     end.

  *  WORD, only find the string if it is preceded by blank,
     punctuation, or line start, and followed by blank, punctuation,
     or line end.

  -----------------------------
  Visible vs. Non-visible Lines
  -----------------------------

  You can limit the scope of FIND and CHANGE commands to visible
  or non-visible lines.

  For example, first exclude all lines:

     EX ALL

  The find all lines containing the string "employee":

     FIND ALL EMPLOYEE

  Now within visible lines only find all occurances of string "wage":

     FIND ALL NX WAGE

  -------------------
  Supressing Messages
  -------------------
   
  Optional parameter QUIET should be specified when invoking
  this command via macro. It suppresses unwanted information
  messages that occur during normal command operation.
   
  ------------------------
  FIND/CHANGE Relationship
  ------------------------

  The relationship between FIND and CHANGE can be used to solve a
  common problem. Suppose that you want to change all of the
  characters "V1.0" to "V2.0" in your documentation because you just
  changed version numbers. But also assume that you want to leave
  some of the instances of "V1.0" in your file unchanged.

  By using the relationship between FIND and CHANGE you can find
  each instance of "V1.0" and then decide whether to change it or
  leave it alone.

  First, scroll to the top of the file. Then, issue the following
  command:

  FIND V1.0

  You are now at the first occurrence of the string "V1.0".  Now
  issue the following command:

  CHANGE V1.0 V2.0

  The first occurrence of "V1.0" is changed to "V2.0".  This is
  where the useful interaction begins.  The RFIND command uses the
  parameters specified in the last FIND (or CHANGE) primary command.
  The RCHANGE command uses the parameters specified in the last
  CHANGE primary command.

  Press [F5] (RFIND) to find the next "V1.0".  Now having found the
  next instance of "V1.0", if you wish to change it, press [F6]
  (RCHANGE).  If you don`t want to change it, press [F5] again to
  continue to the next "V1.0".

  Note:  This example assumes you have not redefined [F5] or [F6].

  --------------------------------
  FIND/CHANGE/EXCLUDE Relationship
  --------------------------------

  The problem described in the previous sub-section can also be
  solved using the relationship between the FIND and EXCLUDE
  commands.

  This solution uses the FIND command to make excluded lines
  containing the find string visible.

  First, use the EXCLUDE primary command to exclude all lines:

  EXCLUDE ALL

  Note:  You could also use the X or XX edit line commands to
  accomplish the same thing.

  Second, use the FIND primary command the make all "V1.0" lines
  visible.

  FIND V1.0 ALL

  Next, use the CHANGE, RFIND, RCHANGE primary commands to change
  only the desired lines.

  CHANGE V1.0 V2.0

  Finally, use the RESET primary command to make all lines visible.

  RESET

  To review:

  *  All these commands are entered in the Primary Command Field or
     by function key.

  *  To exclude all lines (make them invisible): EXCLUDE ALL

  *  To find all lines with a particular string (make them visible):
     FIND string ALL

  *  To find an instance of a particular string: FIND string

  *  To find the next instance of a particular string: RFIND ([F5])

  *  To alter an instance of a string to a new value: CHANGE string1
     string2

  *  To step through the file considering each instance of a target
     string for possible change: RFIND ([F5]) then RCHANGE ([F6])

  -------------
  FIND examples
  -------------

  EXAMPLE:

  Find the first occurrence of string "ABC" in the file:

  FIND FIRST ABC

  Find the last occurrence of string "ABC" in the file:

  FIND LAST ABC

  Find the next occurrence of string "ABC" starting at the current
  cursor position:

  FIND ABC   (this is the most common form)

  or

  FIND NEXT ABC

  Find the previous occurrence of string "ABC" starting at the
  current cursor position:

  FIND PREV ABC

  Find the next occurrence of string "ABC" between columns 1 and 20:

  FIND ABC 1 20

  Find next occurrence of string "one of a kind":

  FIND 'one of a kind'

  Find all occurrences of string "ABC":

  FIND ABC ALL

  Find all occurrences of string "ABC" searching only in EXCLUDED
  lines:

  FIND ABC ALL X

  Find all occurrences of string "ABC" searching only in
  non-EXCLUDED lines:

  FIND ABC ALL NX

  This example finds the first hyphen (-) in columns 1 to 5 between
  lines labeled .E and .S.

  FIND FIRST '-' 1 5 .E .S

  ---------------
  CHANGE examples
  ---------------

  To change string "this" to string "that":

  change this that

  To change string "something" to a null string (''):

  CHANGE something ''

  To change string "ABC" to string "XYZ" in columns 1 through 20
  inclusive:

  CHANGE ABC XYZ 1 20

  To change all occurrences of string "ABC" to "XYZ":

  CHANGE ABC XYZ ALL

  To change all occurrences of string "ABC" to "XYZ" only in
  EXCLUDED lines:

  CHANGE ABC XYZ ALL X

  To change all occurrences of string "ABC" to "XYZ" only in
  non-EXCLUDED lines:

  CHANGE ABC XYZ ALL NX

  To change all blanks to hyphens in columns 1 to 5, between lines
  labeled .B and .E:

  CHANGE ALL ' ' '-' 1 5 .B .E

  ----------------
  EXCLUDE examples
  ----------------

  This example excludes all lines containing string "ELSE" in
  columns 1 to 4 between lines labeled .A and .B:

  EXCLUDE ALL ELSE 1 4 .A .B

