Running a metrics analysis

You can run a metrics analysis from the Software Analyzer Configurations window or from a source program that is open in an editor. Also, you can see the Metrics values for a file that is open in the COBOL or PL/I Editor and LPEX Editor in the Properties view of the IBM® Developer for z/OS® Workspace.

About this task

For remote MVS files, you can run a metrics analysis for only one file. To run an analysis for a remote MVS file, open the file in an editor and run the metrics analysis in the editor.

Procedure

  • Use the Software Analyzer Configurations window.
    1. From the main menu, select Run > Analysis.
    2. In the Software Analyzer Configurations window, expand Software Analyzer, and then select a COBOL or PL/I metrics configuration.
    3. Click Analyze.
      The analysis runs and the results are displayed in the Software Analyzer Results view.
  • Use the COBOL or PL/I Editor.
    1. Open a COBOL or PL/I source file in the editor.
    2. Right-click and expand the Software Analysis menu.
    3. Select a COBOL or PL/I metrics configuration from the list.
      The analysis runs and the results are displayed in the Software Analyzer Results view.

Results

The COBOL Software Metrics or PL/I Software Metricstab of the Software Analyzer Results view displays the metrics for each file, folder, and project.
COBOL Software Metrics tab
If a result exceeds the threshold set for a metric, the result is flagged:
COBOL Software Metrics tab with thresholds flagged

You can filter the results to show only results that exceed the threshold, export results to an XML file, or generate an HTML or PDF report for the results. For instructions for these tasks, see the related links.

You can also find the generated COBOL or PL/I metrics in the Properties view, grouped as Basic Metrics, Complexity Metrics, and Halstead Metrics.

Properties view with metrics