Rational Programming Patterns

PDP COBOL editor

The PDP COBOL editor provides additional functions to the standard COBOL editor. You can modify the COBOL code while clearly seeing the origin of all the code lines (generated lines, Macro lines, or specific code lines), the deleted or overwritten lines, and the potential problems detected by the reconciliation.

To see the content of this editor, you must have generated an instance. Then in the Design Explorer view, right-click the corresponding .cbl file, which contains the generated COBOL. Select Open with > PDP COBOL editor.
Tip: You must be familiar with the concepts explained in Generating and modifying the COBOL of a Program, Screen, or Server before reading this help.

Here you can modify the generated code to adapt it to your particular needs. Modifying the generated code includes inserting code in the generated code, removing generated code or overwriting generated code.

You can use micropatterns or snippets to insert code.

Important: The COBOL syntax check is disabled for all the instances whose type of COBOL code (indicated on the Definition tab) is not an IBM type.

To help you make these user-specific changes, all the advanced functions of the PDP COBOL editor are available: cut/copy/paste, a great array of possible selections, filter view, debug, compare with, local syntax check, content assist by pressing the Ctrl and space keys, and so on.

The specific changes are emphasized by a specific color (which you can change by selecting Window > Preferences > COBOL > Editor > Text Editors ). For example, a DATE-COMPILED line might be colored because the date coming from the Pacbase source is different from the same line produced by the local generator. As long as you do not decide otherwise, the line coming from Pacbase is kept.

The PDP coloring, on top of the COBOL editor coloring, identifies the origin of the lines.

You can change these PDP default colors by selecting Window > Preferences > Pattern Driven Programming > Pacbase Patterns.

Two symbols might be displayed in the margin:
  • Information is displayed if code lines have been deleted or overwritten. If you place your mouse over this symbol, you can see the deleted line or the line overwritten by the current line.
  • Warning is displayed by the reconciliation (the process which integrates, after a generation, the new design of an instance with the user-specific changes) on each line where it has detected a potential problem. Such a problem occurs, for example, when the reconciliation is not sure where it must place the specific code because several locations are possible, or when the overwritten generated code has changed.

    A warning is also displayed on the first line if the generated COBOL is no longer synchronized with the elements that constitute the design of the generated instance. This warning informs you that a new generation is required. If only one of the design files has been modified since the last generation, this file is indicated in the warning. However if several design files have been modified, only the first file is indicated, followed by suspension points.

The PDP COBOL editor indicates a modified state with a * in the tab title of the editor when the .cbl file being edited is directly modified or when one or more referenced design files are modified. When you modify an instance (a Data Element for example) referenced in the COBOL file being edited, the PDP COBOL editor displays a modified state. To undo the changes in the editor and in the model instances, right-click and select Revert File.

You can change the view in the PDP COBOL editor with filters from the Generated Code Structure view. You can also use the contextual menu of the editor to perform the following actions:
  • Unfold all the blocks by right-clicking and selecting Expand all blocks.
  • Collapse all the blocks by right-clicking and selecting Collapse all blocks.

Terms of use | Feedback

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