Compare Two Data Files

  1. From the Micro Focus Data File Tools window, click Tools > Compare Files.

    The File Compare dialog box appears.

    The File Compare dialog box

  2. Select the two data files to compare:
    1. In the File 1 section, click The Select File icon and select the required file.
      Note: If the editor cannot determine the organization and record length of the selected file (for example, it contains no header, or no identically named .pro file found in the same directory), you are prompted to supply the file organization details.
    2. In the Encoding field, click ANSI and set the appropriate encoding for the file.
    3. In the Start at record field, select the record number at which to start the compare.
    4. Repeat these steps in the File 2 section to select the second file.
  3. Select one of the following comparison types:
    • Entire record - the entirety of each record is compared.
      1. In the Compare field, select Entire record.
    • Using structure - only selected fields associated with a structure file, in each record, are compared:
      1. In the Compare field, select Using structure.
      2. In the Structure File field, click The Select File icon (Select file), and then use the use the Open dialog box to select the required .str file.
      3. If you want to only compare some of the fields within a record, click Select fields, and then use the Select fields dialog box to select the layout(s) or field(s) within the structure file that you want to compare; unselected layouts and fields are still displayed, but they are not compared.
        Note: Regardless of the fields selected for comparison, all layouts in the selected structure file are used, where appropriate, when the Structure perspective is selected.
    • Column range - only a specific range of columns within each record is compared. [9]
      1. In the Compare field, select Column range.
      2. In the Start column and End column fields, select the required range.
  4. In the Number of records section, select the number of records to compare:
    Option Description
    Compare all records All records in each file are compared.
    x records Only the first x records, starting from the record number specified during file selection, are compared.
  5. In the Other section, select the following, if applicable:
    Option Description
    Ignore padding characters When selected, do not highlight the current padding character (Tools > Preferences > Padding Character) at the end of a record if a difference has been detected.
    Stop if difference found When selected, the comparison halts after the first difference is encountered.
  6. Click OK.

    The records from the two files are display unformatted, side by side; records containing differences are highlighted.

    The Compare results

  7. If you selected a structure file in step 3, you can view the records in the structured view by selecting a record, then clicking the Structure option in the Perspective group. To return to an unformatted record view, click the Perspective group option again and select Record.
Tip: To view statistics about the current comparison, click The File Information icon (File Information) to display a dialog box of statistics:

Comparison statistics[9]