Filter the Data File

The results of a filter include each record that contains data that satisfied the conditions.

  1. From the Micro Focus Data File Tools window, click File > Open, or click GUID-386F126F-561B-4E90-A4BB-CFE86CB3F00B-low.png (Open File).

    The Open dialog box appears.

  2. Navigate to the required data file, then click Open.

    The Open Data File dialog box appears.

  3. If you are applying a record layout, click Browse to the right of the Structure File (optional) field, then use the Open dialog box to navigate to and select the structure (.str) file that contains the layout.
  4. Click Open Shared (to open the file in read-only mode) or Open Exclusive (to open the file in edit mode).

    The file is displayed on its own tab in the main window.

  5. In the Filter group, click GUID-DCF13628-1366-49C3-8993-8DCE49E33745-low.png(Filter).

    The Filter dialog box appears.

    Note: If a message appears warning you that a valid temporary directory does not exist, on the Tools menu, click Preferences, enter a valid directory in the Temporary Directory field, then repeat the last step.

    Filters are constructed by adding one or more conditions.

  6. To add a reference condition:
    1. Click New Ref.

      The basic filter elements appear.

    2. In the Field field, enter the start position and the number of positions on from that in which to filter on within each record; for example, values of 7:3 will filter on positions 7 to 9 within each record, as indicated below:

      GUID-361A4A2D-B13E-45D8-A23E-0514A128B868-low.png

    3. In the Alphanumeric field, click GUID-1E3884E8-1DFD-4408-A21D-2D5ED6DEA450-low.png and select the type of text to filter: Text or Numeric.
    4. In the Operator field, click GUID-1E3884E8-1DFD-4408-A21D-2D5ED6DEA450-low.png and select the required operator.
    5. In the Value field, enter the filter value.
    6. (Optional) Select Trim to remove any leading or trailing spaces, or leading zeroes from each record before it is filtered.
    7. (Optional) Select Case to ensure the filtered content is case sensitive.
  7. To add a field condition:
    Note: This type of condition is only available if you are using a layout.
    1. Click New Field.

      The basic filter elements appear.

    2. In the Field field, click GUID-1E3884E8-1DFD-4408-A21D-2D5ED6DEA450-low.png and select the field on which to filter.
      Note: Group fields are not available to select.

      The Alphanumeric field is updated based on the type of field selected.

    3. In the Operator field, click GUID-1E3884E8-1DFD-4408-A21D-2D5ED6DEA450-low.png and select the required operator.
    4. In the Value field, enter the filter value.
    5. (Optional) Select Trim to remove any leading or trailing spaces, or leading zeroes from each record before it is filtered.
    6. (Optional) Select Case Sensitive to ensure the filtered content is case sensitive.

    By default, a record must match all specified conditions to be included in the results.

  8. To base the results on a record matching any of the conditions, click Match one.

    GUID-F8C9C263-7366-4FF2-B967-D25CE27D5E44-low.png

  9. Click Filter.

    The results appear.

  10. You can toggle between the results and the original file by clicking GUID-1E3884E8-1DFD-4408-A21D-2D5ED6DEA450-low.png in the Records field and select All or Filtered.
  11. In the Filter group, click GUID-DCF13628-1366-49C3-8993-8DCE49E33745-low.png(Filter) again and the last set of conditions that were used is displayed, where you can amend, add or delete conditions, then click Filter again to refine the results of the filter.
    Tip: When the filter is applied, click the Filter Clauses icon above the data file to display the condition criteria currently being used:

    GUID-B0784964-40B7-4B8D-ABA7-7F35578CDE46-low.png