Find

Use the Find/Change command in the editor to find records that contain specified character strings and to change one specified string to another.

You can use the editor normally while the Find/Change dialog is open.

Follow these steps:

  1. Right-click anywhere in the editor, click Data Set-level Operations, Find/Change.
    The Find/Change dialog displays.

  2. Specify the find and change details:

    • Find
      Specifies the string to find.

    • Change to
      Specifies the string with which you want the find string replaced. If the Change to and Find fields are not the same length, the record length is corrected by be removing characters or adding pad characters to the end of the record. The Change Confirmation message displays with more information about correcting the length of the changed record.

    • Type
      Specifies the data type of the find string.

    • Length
      Specifies the length of the find string. You must complete the Length field if you selected Packed decimal as the data type. Otherwise this field is not active.

  3. Select the column range information. If no column limits are specified, all columns are searched for the Find string.

    • Start column
      Specifies the first, or leftmost, column in which to search.

    • End column
      Specifies the last, or rightmost, column in which to search. If the end column is not also specified, the specified string must begin the in the start column.

  4. Select the occurrence options:

    • Next
      Start from the current position in the file and locate the next occurrence of the specified string.

    • Previous
      Start from the current position in the file and locate the previous occurrence of the specified string.

    • First
      Start at the beginning of the file and locate the first occurrence of the specified string.

    • Last
      Start at the end of the file and locate the last occurrence of the specified string.

  5. Select the location options that define where the string can occur in the context of other characters in a record:

    • Character
      Match strings anywhere in a word.

    • Word
      Match only complete words.

    • Prefix
      Match only strings at the beginning of words.

    • Suffix
      Match only strings at the end of words.

  6. Specify the search options that define where to perform the search:

    • All lines
      Search in all lines.

    • Excluded
      Search only in excluded lines.

    • Nonexcluded lines
      Search only in lines that are not excluded.

    • Find limit
      Specifies the number of records to include in the search.

  7. Click one of the following buttons:

    • Find
      Runs the find command until the specified conditions are met once. The result is highlighted in the editor in Character mode but not in single-record format.

    • Find all
      Runs the find command until all instances that meet the specified conditions are met. The result is highlighted in the editor in Character mode but not in single-record format.

    • Change
      Runs the change command until one change is made according to the specified conditions.

    • Change all
      Runs the change command until all changes are made according to the specified conditions.

      Note: The Change and Change all buttons activate when you specify a value in the Change to field.

    A message displays a summary of the find or change results.
    If the Find and Change to values are a different length, the Change Confirmation dialog displays showing information about correcting the record length. Click OK to exit the Change Confirmation message. For more information about correcting the record length, see Change Confirmation.

  8. Click Close.
    The Find/Change dialog closes. The find or change results remain highlighted until you run a find or change command again or until you reset the processing option.

More information

Reset