Comparing the COBOL code of a Program, Screen, or Server

The Rational Programming Patterns comparator compares two COBOL files, or two folders that can contain many COBOL files.

Note: If the comparator is run on two folders, it compares the files that have the same name in the two folders.
The comparator detects all the significant differences. So it ignores the following differences:
  • Formatting
  • Comments
  • IDENTIFICATION DIVISION
  • Pacbase constants
  • Use of the periods in the DATA DIVISION

You start the comparator with the rpp –compare batch command.

Its execution produces three reports. You can view them in a spreadsheet application. You can change their display by clicking the button in each column and by selecting the new sort value.

The three following spreadsheets are produced:
  • Overview.csv, which displays the general information about the comparison. It contains the following columns:
    • Line numbers. There is one line number for each compared file
    • The names of the files, compared two by two. They are preceded by their folder if the comparator is run on two files.
    • The number of the differences found in these two files
    • The number of the differences found in the PROCEDURE DIVISION
    • The Pacbase constants of the two files. You can compare the two generation contexts
  • Templates.csv, which displays the character strings that were replaced, inserted, or deleted in the compared files. A template number is assigned to any identical replacement, insertion, or deletion in several files.
    Example: If the same work area was inserted in more than one Program, Screen, or Server, the comparator groups these insertions under the same template number.
    To see all the Program, Screen, or Server instances that used this template, open the DiffList.csv spreadsheet. It associates the template numbers with the instance names.
    The Templates.csv spreadsheet contains the following columns:
    • The template number of the difference
    • The number of times the template is used in all the compared files
    • The template nature (insertion, replacement, or deletion)
    • The number of the character strings which is added or deleted
    • The added or deleted character strings
  • DiffList.csv, which displays the contents of the lines where differences are detected. By default, the differences are sorted by Program, Screen, or Server instance. This spreadsheet contains the following columns:
    • The line number. There are as many lines as differences in all the compared files.
    • The difference rank number for each file.
      Example: If, in the Overview tab, 16 differences are indicated for a Program, this column displays 16 lines that apply to this Program.
      The difference rank number starts again at 1 after all the differences of the Program, Screen, or Server instance are displayed in the table.
    • The number of the difference template
    • The number of times the difference is detected in the Program, Screen, or Server
    • The word Procedure if the line is part of the PROCEDURE DIVISION
    • The codes of the compared Program, Screen, or Server instances, preceded by the folders if you compare folders
    • The corresponding COBOL lines in the two compared files

Feedback