Managing the generated code

The code that is produced by the generation corresponds to the information that is entered in the instance design. All the properties are replaced with their values. Furthermore, the Static Micropatterns are replaced with the corresponding code lines if these Micropatterns are defined and described. 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 the reconciliation.

To see and modify the generated code, expand the COBOL Program, COBOL Copybook, or Source Code in the Design Explorer view. Right-click the generated file and open the associated code editor:
You can then see the following elements: The PDP COBOL and COPY COBOL editors differentiate 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 from the design generation, and the code from the specific insertions. Moreover, the specific code insertions will move to fit the new design at best.

All the inconsistencies, if any, 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. You can insert code lines by calling Static Micropatterns from the Snippets view, RPP SDK Micropattern Snippets category. You can also call micropatterns that were created with the application programming interface.

When you modify the code in the PDP COBOL editor, this modification is immediately visible in the Generated Code Structure view. Save the new code. If you want to restore the originally generated code, open the Generated Code Structure view and select Restore generated code in the menu. PDP then recognizes that the code corresponds to a generated code.


Feedback