Viewing program control flow for a PL/I file

Program control flow provides a graphical view of the logical flow within a PL/I program. You can use this feature to identify potential logic problems or locate code that is not being used.

About this task

You can run program analysis on a PL/I file while it is in edit mode. After you start the analysis, the Program Control Flow view opens with a hierarchal graph of the parts within the program file. Each node represents a callable statement, such as a program, package, or procedure. The following example shows several procedures. To navigate from one node to another, click the node in the tree. The corresponding code is visible and highlighted in the file.

Figure 1. Example of program control flow diagram
Program analysis data of the Global Mart sample

Procedure

  1. Open a PL/I file in the PL/I Editor or System z® LPEX Editor.
  2. Right-click in the file to open the menu.
  3. Click Show In > Program Control Flow. The Program Control Flow view opens with a diagram that shows the program and associated packages and procedures in the file. A brief description about the node is given when you hover over it. The description includes the node type, name and line number within the file.
  4. To focus the tree diagram on a specific flow, right-click a select node in the diagram. This action is helpful if the program is large because you can focus on a single flow. Click one of the following options.
    • Show program content flow from here: Displays the code that is called from the selected node.
    • Show program content flow to here: Displays the code that calls the selected node.
    • Show all: Displays all procedures in the code.

Feedback