Managing the warnings in the Problems view or the PDP COBOL editor

You manage the Rational® Programming Patterns warnings by applying quick fixes to them. You access these quick fixes from the Problems view. For the migration and reconciliation warnings, you can also access the quick fixes directly from the PDP COBOL editor.

You display the quick fixes in one of the following ways:
  • From the Problems view, right-click a warning and select Quick fix.
  • From the PDP COBOL editor, click the symbol Quick fix for the reconciliation and migration warnings of a migration or reconciliation warning. You can also right-click one of the lines that bear the warning and select Quick fix, or click one or these lines and select Edit > Quick fix.
Then, you double-click the appropriate quick fix to apply it.
The following quick fixes are available:
  • Remove warning. If you select this quick fix, the warning is removed and the line is displayed like all the other specific lines. However, if this difference is detected again upon the next generation, this warning will be displayed again.
  • Validate the migration. If you select this quick fix while the PDP editor is open, the Compare editor opens. This editor displays both the Pacbase code and the local code. It emphasizes all the differences that are detected in these two codes.
    The local code can be modified. You can then copy the lines of the Pacbase file into the local file. You can proceed in two ways:
    • Copy all the nonconflicting changes by clicking the corresponding button in the toolbar. You must manage the remaining changes individually.
    • Select a change in the Pacbase file and copy it into the local file. You can place the cursor at the insertion point or click the toolbar button with which you can copy the currently selected change.
    Note: If you do not want to keep your changes, you can close the PDP COBOL editor without saving.

    After this manual validation, run a new local generation. As the migration help function is disabled, the warnings are no longer calculated. You must then save the locally generated code. It replaces the Pacbase generated code. You can then work on the instance.

    If you select this quick fix while the PDP COBOL editor is closed, the local code is implicitly saved. The local code automatically replaces the Pacbase generated code and the warnings are removed.

    However, if the PDP COBOL editor is open, you must save the code.

  • Show differences. If you select this quick fix, the Rational Developer for System z® (IBM® Developer for z Systems™) and Rational Developer for AIX® and Linux Compare editor opens. This editor displays both the Pacbase code and the local code, in a fragmented way. It emphasizes the differences that are detected in the two codes.

    With this quick fix, the code of the locally generated file cannot be modified directly in the Compare editor.

    Note: The contextual menu of the compare editor contains standard options to copy, find and replace, and customize the display of the differences.
    Moreover, the following options are specific to Rational Programming Patterns:
    • Ignore comments: This option only applies to the display of the migration differences. If it is selected (default value), the differences in the comments are not flagged. If you change the selection of this option in the contextual menu of the compare editor, you must close and open the editor again to take the modification into account. Moreover, this modification is saved and changes the default preference.
    • Ignore EXIT: If this option is selected (default value), the differences in the presence or absence of the EXIT statements after the tags are not flagged in the compare editor. Changing the selection of this option in the compare editor immediately modifies the display of the differences. However, it does not modify the default preference.
    • Ignore END-EXEC format: If this option is selected (default value), the formatting differences of the END-EXEC statements are not flagged. In Rational Programming Patterns, the END-EXEC statements are always generated on continuation lines. It is not always the case in Pacbase. This formatting difference applies to the Macro code, the generated code, and the specific code. You can choose to ignore these differences. If you change the selection of this option in the contextual menu of the compare editor, you must close and open the editor again to take the modification into account. Moreover, this modification is saved and changes the default preference.
    • Ignore micropattern id: If this option is selected (default value), the differences in the internal identifiers of micropatterns are not flagged in the compare editor. These identifiers are automatically added upon generation according to the order number of the micropattern calls in the code. They are displayed as id=n (where n is the order number of the micropatterns call). This n number is carried over to the generated lines of the micropattern, from column 73. In this case, non-significant zeros are added to it so that it is displayed on 6 characters.

      Differences in micropattern identifiers can be flagged in the compare editor by the migration help because these identifiers are generated in Rational Programming Patterns but not in Pacbase. Differences can also occur in a COBOL code that comes from two streams.

      Changing the selection of this option in the contextual menu of the compare editor immediately modifies the display of the differences. However, it does not modify the default preference.

    The default values of these options are selected in the COBOL comparison preferences that are available from Window > Preferences > Pattern Driven Programming > Pacbase Patterns.

  • Show differences on the whole file. This quick fix is identical to the previous quick fix, except that the Compare editor displays the file content as a whole.

    With this quick fix, the code of the locally generated file cannot be modified directly in the Compare editor.


Feedback