Viewing the Program Structure chart


A Program Structure chart provides a visual and interactive presentation of a program as a collection of procedures or paragraph nodes. You can expand and collapse nodes to assist in your code analysis. You can view the program and the Program Structure chart side by side.

You can use the Program Structure chart to perform the following actions:

  • Zoom in and zoom out the chart.
  • Move the visible area of a large chart without changing the zoom level.
  • View details of procedures, callable programs, and database nodes.
  • Show and hide icons in the nodes, external calls, and zoom slider
  • Identify dead code in the program.
  • Navigate between the chart and code in the editor.

To view the Program Structure chart, right-click a PLI or COBOL program, and select Code Insights > Show Program Structure. The Program Structure chart opens for the selected program. Nodes representing procedures, programs, and databases are represented by rectangular boxes. Nodes representing external calls are represented by an ellipse shape.

image-2024-9-12_21-48-13.png

You can use this Program Structure chart to perform the following actions:

Purpose

Action

Change the layout of the chart:

  • (Default) Left to right
  • Top to down

Select View > Chart Direction.

Show or hide external call nodes.

Select View > Show External Calls.

Show or hide node icons.

Select View > Show Icons in Nodes.

Zoom in or out.

Select View > Show Zoom Slider and use the Fit to screen slider.

See the dead code that can never be executed exists in the program.

Select View > Show Dead Code.

Expand all nodes to show their children.

Select View > Expand All.

Expand or collapse a node to show or hide its children.

Click image-2024-8-8_21-24-31.pngorimage-2024-8-8_21-25-21.png

View the following information about a node:

  • Procedure, program, or database name
  • Line number
  • Statements

Hover over a node.

Display the complete node hierarchy.

Right-click a node and select Show Hierarchy.

To view the parent node and the descendant nodes. A node must have a children node. 

Right-click a node and select Make Root.

Highlight the line of code in the editor.

Right-click a node and select Show in Editor.

(For procedures only) Display the Logic Flow chart. Each node in this chart displays the line number and action associated with that node.

Right-click a node and select Show Logic Flow.

(For procedures only) Display a summary that explains the procedure.

Right-click a node and select Explain Procedure.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*