Rational Developer for System z, Version 7.5

Generated Code Structure view

The Generated Code Structure view displays a hierarchical tree showing the generated nodes of the program. It enables you to easily spot where specific code has been entered. Moreover, if you have modified the design of a program which contains specific code, you must consult this view after each new generation to see whether the reconciliation (which integrates the new design while keeping the specific code) has detected any potential problems.

To see the content of this view, you must have generated a program. Then, in the Design explorer view of the Design perspective, right-click on the corresponding .cbl file, which contains the generated Cobol, and select Open with > Pdp Cobol System z LPEX Editor in the popup menu. The Cobol editor must remain open and currently selected.
Tip: You must be familiar with the concepts explained in Generating the Pac COBOL and modifying it: the various steps before reading this help.
The Generated Code Structure view looks like this:

For Pacbase, the nodes correspond to divisions and sections.

The Procedure division displays the generated functions and sub-functions. each containing a body and a -fn.
Note: If comments are attached to the function or subfunction, they are inserted in the nodes, between the (sub)function start tag and body.
In the hierarchical tree, you can see:
  • generated code if the text block representing the node is generated. These lines are gray. If you have added non-significant characters in the code (tabs, spaces between words...) or insert a comment, a reformatted code symbol is also displayed.
  • specific code if the text block representing the node contains specific changes, that is if the generated code has been modified, if part of or all it has been deleted, or if characters have been removed from the text. These lines are black. A symbol specifies the type of specific change:
    • modified code is displayed where you have modified the text of the node and no error has been found by the reconciliation.
    • modified code with warning is displayed where the reconciliation has detected a possible problem (ex: if the reconciliation is not sure where it should place the specific code because several locations are possible, or if the overwritten generated code has changed). It draws your attention to the problem and it is then up to you to validate or reject the choices made by the reconciliation.
      • You can keep the choices made by the reconciliation by right-clicking on the node and selecting Validate (<==> clean warnings).
      • Or you can overwrite the text modifications with the originally-generated code by right-clicking on the node and selecting Restore generated code. The node will then be displayed like a generated node (its block text will be gray, with a generated code at the beginning).
    • modified code with error is displayed where the reconciliation has detected a serious problem.
    • added code is displayed where you have added a block of text in the node or created a new specific node.
    • deleted is displayed where you have deleted the whole text of the node (if you have deleted only part of it, it is considered as a modification).
You can modify the display of the view by:
  • Displaying only the nodes which represent specific code, as well as their upward hierarchy. To do so, click the show user code button in the toolbar.
  • Filtering nodes. To do so, type a name pattern in the Filters text-entry field located right above the hierarchical tree. To see the whole program again, erase the content of the field.
    Note: You can use the * and ? wildcard characters in the filter string (they are optional at the end of the filter string). You must separate multiple filter strings with commas.
  • Expanding the selected node. To do so, select a node, right-click and select Expand node in the popup menu.
  • Expanding all the tree nodes. To do so, right-click on the expand all button in the toolbar located at the top of the view. To collapse the view to the nodes that are displayed when you first edit a COBOL program , click the collapse all button in the toolbar.
Related tasks
Generating the Pac COBOL and modifying it: the various steps

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)