Rational Developer for System z

Fixing a problem reported in a result

This topic describes how to modify a COBOL source code file to fix a problem detected during a COBOL code review.

Follow these steps:

  1. In the Software Analyzer Results view:
    1. Right-click the result that you are interested in.
    2. Click View Result.
  2. The relevant COBOL source code file is opened in the COBOL editor and is highlighted:
    • The source code file is positioned to display the lines of code that are reported in the result.
    • The lines of code are temporarily highlighted.
    • The severity icon reported in the result is displayed in the left margin at the first line of the problem. Clicking the icon displays the text of the rule.1
    Figure 1 shows an example:
    Figure 1. View of a rule result in the COBOL editor, with highlightingrule result in the COBOL editor
  3. In the COBOL editor:
    1. Modify the source code to fix the problem that caused the result to be generated.
    2. Save the file and close the editor.

At this point, if you have no other problems to fix, you can rerun the COBOL analysis to verify that your change to the source code fixed the problem.

Notes:

1In the Preferences you can control whether the icons are displayed in the left margin of the COBOL editor. By default the icons are displayed. Follow these steps to change the settings:
  1. Click Window > Preferences.
  2. In the Preferences window, click General > Editors > Text Editors > Annotations.
  3. In the Annotation types list, click the identifier for one of the icons. The identifiers are:
    • Code review recommendation
    • Code review severe warning
    • Code review warning
  4. Select Vertical ruler to have the icon displayed, or clear it to keep the icon from being displayed.


Feedback