You can compare two files on a remote system and copy changes
between the two files.
The Text Compare editor uses the Eclipse text editor to compare
two files. You can set preferences for text comparisons using the
Compare/Patch preference settings. To open this preference page, click
Window
> Preferences, then expand the
General list
item and click
Compare/Patch. Using the settings
on this page, you can, for example, select the
Ignore white
space option to control whether or not white space changes
are shown in the compare viewer. See the related topics for more information
on setting text comparison preferences.
When you compare
remote files from the Remote Systems view or the z/OS® Projects view, the compare editor performs
several file checks to ensure that the files you are comparing are
fundamentally compatible:
- It checks the record format and record length parameters of the
two files and displays a warning if these parameters are different.
You have the option of continuing with the comparison or canceling
it.
- If you edit either file, it checks the length of each record and,
when you save the file, warns you if any record exceeds the maximum
record length.
- If you attempt to save a file with records that exceed the maximum
record length, it warns you that the records will be truncated and
gives you an opportunity to correct the records. The warning message
includes detailed information about line numbers that exceed the maximum
record length.
To compare two files on a remote system, do these steps:
- From the Remote Systems view or the z/OS Projects view, select two files and then
select Compare With > Each Other. The files open side by side in the Text Compare editor. Rational® Developer for System z® locks both files during
the Text Compare edit session. If it cannot obtain a lock on either
file, it displays a warning message. You can either cancel the compare
request or continue with it. If you choose to continue, the file that
cannot be locked is opened in read-only mode. If the
two files differ either in record format or in record length, a window
opens warning you of the difference and prompts you to continue with
or cancel the comparison. When the files open, the text compare editor
includes line numbers for each file to help you navigate through the
files and locate any lines that exceed the maximum length.
- You can perform the following actions on the files:
The compare function uses the Eclipse text editor
rather than the System z LPEX
Editor, so capabilities that are available when editing remote files
using System z LPEX Editor,
such as display of virtual record boundaries, are not available.
- To save your changes, press Ctrl S. If the changes you have made cause any records
to exceed the maximum length, Rational Developer
for System z displays a
File Truncation Warning. You can click the Details button
on this warning to see a list of specific line numbers and their length.
- Click Yes to save your files or No to
return to the text compare edit session. If you click No to
return to the edit session, the editor positions the file at the first
line that exceeds the record length limit.