Working with the Data Flow Chart
The flow of data within a program is shown graphically and in table form in the data flow chart view. The Chart tab and Table tab at the bottom of the view are used to select the desired representation. Clicking on a variable field or a referenced literal in the Workbench COBOL Editor or Workbench PL/I Editor—or specifying a variable in the view’s drop-down text box—will chart the flow of data associated with that variable. On the Chart tab, fields are shown as nodes, rounded rectangular boxes representing data items. These nodes are connected by lines representing the flow of data within the program, with arrowheads indicating the direction of the data flow. The node for the selected variable is highlighted in the data flow chart with a red border.
The lines connecting data flow chart nodes represent the type of data flow:
- Solid lines indicate moves.
- Dashed lines indicate conditional flow.
- Dotted lines indicate an alias.
- Dash-dot-dash lines indicate a conditional flow alias.
Curved line are used to reduce overlapping.
The data flow chart includes six buttons that control what is shown in the chart. If a button is depressed, that type of data flow is shown, and if it is not depressed, that type of data flow is hidden. These buttons can be used to tailor the contents of the data flow chart as follows:
Show All Depths. By default, only data flows with a Depth of 0 (those directly related to the selected variable) are shown. Depress to show data flows for all levels of Depth. | |
Show Aliases. Depress to show data flow for aliases of the selected variable. Default is not depressed. | |
Show Conditional Flow. Depress to show data flow — either to or from the variable — that occurs as a result of conditional logic. Default is depressed. | |
Show Flow To. Depress to show the data flowing to the selected variable. Default is depressed. | |
Show Flow From. Depress to show the data flowing from the selected variable. Default is depressed. | |
Pin Data Flow. Toggles whether the view is linked to the active editor. When selected, the current data flow chart view is retained. Values shown in the corresponding Properties view are also retained. When deselected, the views are synchronized with selections made in the active editor. Default is deselected. |
The text box at the top of both the Chart tab and Table tab can be used to enter the name of the desired variable. As characters are entered, a list of matching variables is displayed. Click the arrow on the right end of the text box to display a list of all variables for which data flow can be displayed.
Clicking a data flow chart node selects and highlights it with a bold border and synchronizes the Workbench COBOL Editor or Workbench PL/I Editor to where the variable was defined in the program. The characteristics of the data flow chart node are displayed on the Table tab and in the Properties view. Ctrl-clicking one or more additional nodes selects and highlights them while also highlighting the data flow path between the selected nodes.
Nodes can be arranged top to bottom (the default), left to right, or bottom to top by right-clicking anywhere in the data flow chart and selecting Layout > Top Down, Layout > Left to Right, or Layout > Bottom Up.
Data flow chart nodes can be collapsed to hide subsequent nodes by right-clicking and selecting Collapse. The collapsed node includes a red indicator in the lower right corner showing the number of levels that have been collapsed. To redisplay nodes hidden under a collapsed node, right-click the node and select Expand, Expand All, or Expand Levels. Selecting Expand expands the collapsed node one level. Selecting Expand All fully expands all nodes under the collapsed node. Expand Levels provides sub-menu choices to expand the collapsed node by 3, 5, or 7 levels. If the node has collapsed more levels than it is expanded, subsequent nodes that remain collapsed include a red indicator showing the number of levels that could still be expanded. For easier viewing after the desired nodes have been collapsed, the chart can be redrawn without the hidden nodes by right-clicking anywhere in the data flow chart and selecting the desired Layout> option.
The Table tab can be used to view the contents of the Chart tab in a table layout. Available information for each data item in the view is provided in the following columns:
- Data Item
- Defined
- Line
- Data Action
- Verb
- Depth
- Definition member
- Definition member dataset
- Length (Physical)
- Length (Logical)
- Picture
- Usage
- Memory offset
- Parent
- Level
- Initial value
- Occurs
- Where modified
- Where used
The values in the Table tab can be exported for later comparison following code changes. For more information, see Exporting-the-Program-Summary-Problems-Procedures-and-Data-Flow-Table-Views.
Preferences can be used to customize node size and line wrapping of node content in the data flow chart. To change your preferences, click Window > Preferences. The Preferences dialog box appears. Expand BMC and select Data Visualizer. The Preferences for the Data Visualizer, which also controls the logic flow and data flow charts, are shown. See Specifying-Preferences.
For more information, see:
- Exporting-the-Program-Summary-Problems-Procedures-and-Data-Flow-Table-Views
- Working-with-the-Program-Structure-Chart
- Working-with-the-Logic-Flow-Chart