Rational Developer for System z

Program control flow within a file

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

You can run program analysis on a COBOL file while it is in edit mode. After starting 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 section or paragraph. For example, in Figure 1 there are several paragraphs shown. To navigate from one node to another, click the node in the tree and 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

You can narrow the tree diagram to information about a specific node. This is helpful if the program is large, you can focus on a single paragraph. The Show Program Control Flow from here displays all routines that are called. The Show Program Control Flow to here displays all routines that being called. A brief description about the node is given when you hover over it. The description includes the paragraph name and line number of the paragraph.

Navigating the flow diagram

Features on the taskbar provide zoom in, zoom out, and return to original size. The save feature creates a bitmap of the diagram that you specify where to save it.

To locate a node by name, use the search field on the taskbar. In the search field, type the partial or full name of the program, section, or paragraph.

The view contains a toolbar that allows you to navigate the diagram.

down arrow icon: Move to next node in the diagram

up arrow icon: Move to previous node in the diagram

zoom in icon: Enlarge the diagram.

zoom out icon: Reduce the diagram.

zoom to fit: The diagram is enlarged or reduced to fit the size of the Program Control Flow view.

reset: Reset the diagram to the original size.

save as icon: Create a bitmap of the diagram that you specify where to save it.

Restrictions and considerations

There are several restrictions when using this feature:
  • The program control flow diagram will not display control flow nodes for control transfers generated by the following statements:
    • CICS® HANDLE
    • CICS PUSH
    • CICS POP
    • SQL WHENEVER
  • Quick fix is not available.

Feedback