Comparing remote files

You can compare up to three different files on a remote system and copy changes between the files.

Before you begin

The Text Compare editor uses the Eclipse text editor to compare two files. You can set preferences for text comparisons by using the Compare/Patch preference settings. Open the Preferences window, and navigate to General > Compare/Patch. You can also set language-specific preferences for comparing COBOL, PL/I, and JCL files. For more information about setting text comparison preferences, see the related links.
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 are 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.
  • It checks whether either file is locked. Locked files are opened in read-only mode.
  • Files that contain characters that cannot be transferred from the remote system to the local system and back with the given remote and local code pages are opened as read-only.

Procedure

To compare files on a remote system, do these steps:

  1. From the Remote Systems view or the z/OS Projects view, select the files and then select Compare With > Each Other.
    The files open side by side in the Text Compare editor. The editor 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 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.
  2. Perform any of the following actions on the files:
    • Click Copy All from Left to Right to copy all file changes from left to right.
    • Click Copy All Nonconflicting Changes from Right to Left to copy all nonconflicting changes from right to left.
    • Click Copy Current Change from Left to Right to copy the current change from left to right.
    • Click Copy Current Change from Right to Left to copy the current change from right to left.
    • Click Next Difference to locate the next difference.
    • Click Previous Difference to locate the previous difference.
    • Click Next Change to locate the next change.
      Note: Next Change locates a block of text that is different between the files that are being compared, and Next Difference locates a string within a change block.
    • Click Previous Change to locate the previous change.
    The compare function uses the Eclipse text editor rather than the z Systems® LPEX Editor, so capabilities that are available when you edit remote files by using z Systems LPEX Editor, such as display of visual record boundaries, are not available.
  3. To save your changes, press Ctrl+S.
    If the changes you made cause any records to exceed the maximum length, a File Truncation Warning opens. You can click Details on this warning to see a list of specific line numbers and their length.
  4. 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.