Rational Programming Patterns

Generated Code Structure view

The Generated Code Structure view displays a hierarchical tree showing the generated nodes of the Program, Screen, or Server. You can easily spot where specific code was entered. Moreover, if you modified the design of a Program, Screen, or Server that contains specific code, you must consult this view after each new generation. This view shows whether the reconciliation (which integrates the new design while keeping the specific code) detected any potential problems.

To see the content of this view, you must have generated a program (Program, Screen, or Server). Then in the Design Explorer view, right-click the corresponding .cbl file, which contains the generated COBOL. Select Open with > PDP COBOL editor. The COBOL editor must remain open and currently selected.
Tip: You must be familiar with the concepts explained in Generating and modifying the COBOL of a Program, Screen, or Server.

For Pacbase, the nodes correspond to functions, subfunctions, sections, and divisions.

In the hierarchical tree, you can see the following symbols:
  • Generated code if the text block representing the node is generated. These lines are gray.
  • Reformatted code if the text block representing the node contains specific changes: if the generated code was modified, if code was added or deleted. The following symbols specify the type of specific change:
    • Modified code is displayed where you modified the text of the node and no error was found by the reconciliation.
    • Added code is displayed where you added a block of text in the node or created a specific node.
    • Deleted code is displayed where you deleted the whole text of the node (if you deleted only part of it, it is considered as a modification).
    Note: For each level in the tree where a warning is tagged, you can opt for one of the following actions:
    • Keep the choices made by the reconciliation by right-clicking the node and selecting Remove warnings.
    • Overwrite the text modifications with the originally generated code by right-clicking on the node and selecting Restore generated code. The node is then displayed like a generated node. Its block text is gray, with a Generated code symbol at the beginning.

By default, the tree displays the titles of the generated and specific functions and subfunctions. These titles are extracted from the comment that precedes the function or subfunction. Only the relevant characters are recognized. Characters such as *, +, ot =, and the NOTE character string are not included in the titles. If you do not want to display the titles of the functions and subfunctions, clear the option Display the long labels of the nodes from Window > Preferences > Pattern Driven Programming > PDP framework.

You can modify the display of the view through one of the following actions:
  • Display only the nodes which represent specific code, and their upward hierarchy. To do so, click the Show user code button in the toolbar.
  • Filter the nodes. To do so, type a name pattern in the Filters field of the view. To see the whole code 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.
  • Expand or collapse all the tree nodes. To do so, click Expand all or Collapse all in the view toolbar.
  • Display the nodes created when the micropatterns that retrieve the parameterized operators in Macros are expanded. These nodes are then hidden by default in order not to clutter the nodes tree. However you can display them to detect problems, if any. To do so, clear the option Hide nodes owning the property "hidden" from Window > Preferences > Pattern Driven Programming > PDP framework.

From this view, you can filter the text in the PDP COBOL editor and display or hide parts of the COBOL source.


Terms of use | Feedback

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