Comparing resources

You use the Eclipse Workbench built-in compare function to compare the contents of two resources in a project. The compare function opens in a special compare editor. You can use the compare function to assist you in identifying differences between resources, and to copy changes from one resource to another.

To start the comparison select two files in a CICS® DA project, right-click, and click Compare With > Each Other in the menu. If the resources content is the same, a dialog is displayed indicating that the resources are identical.

The dialog indicating the files are identical
If the resources are not the same, the compare editor opens.

In the following screen two CICS region resources are being compared. The compare editor view tab identifies the resources, and the content of each resource is shown side-by-side in the editor.

An example screen capture of two CICS region resources showing the resource content side by side in the compare editor.

Where the content does not match, the editor outlines the data in each file, and connects the blocks with a line.

In this example, the first line from the top indicates that the text in the left pane is missing from the right pane. The second and third lines indicate that the text blocks are different, and the differences are highlighted by a different background color. The vertical bars at the right of the view show where the differences are in the view. You can click one of the bars to navigate to that block of data.

You can make manual changes to the resources in the compare editor. You are asked if you want to save your changes when you close the editor. Alternatively, you can use the compare editor icons to copy changes from one pane to the other pane, or you can change one file to match the other:

  • Click the Copy all icons The copy all icons to copy the contents of one file to the other file,
  • Click the Copy data block icons Copy data block icons to copy the currently selected block of data from one file to the other.
  • Click the Next difference icons The next difference icons to navigate between the blocks of data.
  • Click the Next change icons The next change icons to navigate between the individual differences.

When you have finished viewing or changing the resources, click X in the view tab to close the compare editor. You are asked to confirm any changes you made before closing the editor.