Viewing program data flow for a COBOL file
Program data flow provides a graphical and hierarchical view of the data flow within a COBOL program. You can use this feature to examine how a data element is populated, modified, or written elsewhere.
About this task
- COBOL Editor
The program data flow can be viewed in both a diagram and hierarchy.
The data elements that can be selected include declarations in the data division (data items, renames, file descriptors, and conditions) or their references in the procedure division.
- The data flow analysis supports COBOL programs only. PL/I is not supported.
- Base COBOL language elements and some embedded languages (such as CICS and SQL) are supported. DLI is not supported.
- On Windows platforms, you can save diagrams in Scalable Vector Graphics (SVG) format or Portable Network Graphics (PNG) format. On MacOS and Linux platforms you can save diagrams in SVG format.
Procedure
Navigating the data flow diagram
About this task
The data flow diagram shows a set of nodes and a set of arcs connecting the nodes. Each node represents a data element, file, or literal that is connected in some way to the selected data element for the data flow. Each node has a label and a type. The labels correspond to the name of element represented by the node. The types (file, group data element, non-group data element, and literal) are represented by different icons.
Nodes appear with identical colors and borders except in the cases of a selected node, which appears highlighted with a different color, and the node that represents the target of the data flow, which appears highlighted with a lighter color than the selected node and with a darker border. These differences in color help you easily identify the currently selected node and the target node of the data flow diagram.
There are two types of arcs, directed arcs and undirected arcs. Directed arcs represent the statement or statements that cause data to flow to or from the target element. Directed arcs appear as solid lines with arrows at one end. When data flows to the target element, the directed arc's arrow points to the target element. When data flows from the target element, the directed arc's arrow points away from the target element.
When an element is a group element, data flowing to or from that element also affects the values of the group's members. Likewise, when an element is a member of a group, data flowing to or from that element also affects the value of the group. This hierarchical relationship between a group and its members is represented by an undirected arc. Undirected arcs appear as dotted lines with no arrows.
Features on the diagram control area 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.
Procedure
: Enlarge the diagram.
: Reduce the diagram.
: Reset the diagram to the original size.
: The diagram is enlarged or reduced to fit the size of the Data Flow
view.
: Refresh the diagram.
: Save the diagram in PNG or SVG format to the specified location.
Navigating the data flow hierarchy
About this task
The data flow hierarchy shows all of the program elements that write to or read from the data element in a tree.
Procedure
- Click the Reads toolbar icon, and
select a child element in the left side of the view. The right side of the view shows the line of code where the data element is read from.
- Click the Writes toolbar icon, and
select a child element in the left side of the view. The right side of the view shows the line of code where the data element is written to.

