Rational Programming Patterns

Managing the code

You can modify the code by adding specific changes. You can also modify the design and generate again. The generation always keeps your specific code, while taking all the design modifications into account: This process is called reconciliation.

To see and modify the generated code, expand the Program, Screen, or Server instance in the Design Explorer view. Right-click the .cbl file and select Open with > PDP COBOL editor.

You can then view the following elements of the instance:
  • Its generated code in the PDP COBOL editor. This editor offers more functions, on top of the ones that are already provided by the standard COBOL editor, which helps you modify the code.
  • Its design as a hierarchical tree in the Design view. Dedicated wizards help you modify the Program, Screen, or Server design.
  • Its generated nodes in the Generated Code Structure view and accept or reject the choices that are made by the reconciliation.
The PDP COBOL editor differentiates the generated code from the specific code. You can then modify the design of an instance that contains specific code. After a new local generation, the newly generated code will take into account the code produced by the generation of the design, and will include the code produced by the generation of the specific insertions. Moreover, the specific code insertions will move to fit the new design at best. This process is called the reconciliation.

All the inconsistencies, if any, found upon generation are listed in the Problems view.

If the generated code does not fully fit your needs, you can modify it. You can insert code, delete, or overwrite parts of this code. The changes that you make are called specific changes.
Note: In the PDP COBOL editor, some micropatterns and snippets, which are microgenerators, make it easier to enter some specific changes. Moreover, a wizard for the creation of functions and subfunctions simplifies insertions in the PROCEDURE DIVISION.
When you enter a specific change in the PDP COBOL editor, this change is immediately visible in the Generated Code Structure view. Save the new code. If you want to restore the originally generated code, go the Generated Code Structure view and select Restore generated code in the menu. PDP then recognizes that the code corresponds to a generated code.
To specify enhancements or correct bugs that require changes in the design, you must carry out the following actions
  1. Open the Design view. Modify the design, save it and generate the instance again to trigger the reconciliation
  2. Then, open the Generated Code Structure view to see whether errors or warnings have been flagged by the reconciliation. You must correct the errors, and deal with the warnings by validating or rejecting the choices that are made by the reconciliation.

Terms of use | Feedback

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