Viewing the Procedure View
To view the Procedure View, right-click the PLI or COBOL program, and select Code Insights > Show Procedure View. The Procedure View <procedure name> tab opens for the selected program.
You see the following fields.
Field | Description |
---|---|
Procedure Name | Name of the procedure. |
Performs | The number of performs in the procedure. |
Program Calls | The number of external program calls in the procedure. |
File I/O | Number of file I/O statements in the procedure. |
SQL Statements | The number of SQL calls in the procedure. |
Statements | The number of statements in the procedure. |
Conditionals | The number of conditional statements in the procedure. |
Starting Line | Starting line of the procedure. |
McCabe | The metric that relates to the number of decision points (points where the logic path splits) in the procedure. A high number indicates that the procedure is complex. |
Blocks | Number of code blocks in the procedure. These code blocks are found in the logic flow chart. |
GOTOs | Number of GO TO statements. |
Perform Range Violations | Indicates whether any GO TO statements branch outside their procedures, which would be a perform range violation. This column only appears for COBOL programs. |
Group Returns | Indicates whether control returns to the statement following the procedure. Yes indicates that the procedure returns control. No indicates that the procedure does not return control. Maybe means the procedure contains a conditionally executed GOBACK, STOP RUN, or EXIT PROGRAM and potentially does not return control. |
In the table, you can perform the following actions:
- Click Export to export the procedure details in CSV format.
- Right-click on the procedure and select Show in Editor to view the selected procedure in the editor.
- Right-click on the procedure and select Explain procedure. This opens the selection of that particular procedure in the editor and you can view the Explain tab with Explanation, Comments, and Code tabs. You can perform the following tasks:
- Explanation tab: Displays the summary of the code. Click Copy
to copy the summary to the clipboard. If you're unsatisfied with the summary, click Regenerate
to receive a new one.
- Comment tab: Displays the summary that is converted into a comment for the code.
- Explanation tab: Displays the summary of the code. Click Copy
- Click
to copy the comments to the clipboard.
- Click
to paste the comment to the file. You must open the file in edit mode when you use this option.
- Click
to convert the comments to uppercase.
- Click
- Code tab: Displays the selected code to be explained. Click
to copy the code to the clipboard.