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.
- For a COBOL Program, right-click the .cbl file and select . You will then be able to use all the functions of the PDP COBOL editor and of the Design and
Generated Code Structure views. Working on the code will then be made
easier.Note: The Design view is empty. It is deprecated and will be removed in a future version.
- For a COBOL Copybook, right-click the .cpy file and select . You will then be able to use all the functions of the PDP COBOL editor and the Design view.Note: The Design view is empty. It is deprecated and will be removed in a future version.
- For a Source Code, right-click the file whose extension is indicated in the called Skeleton. By default, the generated code opens in the Eclipse editor that is associated with the extension of the generated file. However, to modify the code, you must open it in the PDP Source Code editor. To do so, right-click the generated file and select .
- The generated code in the PDP COBOL editor. This editor complements the functions that are already provided by the standard COBOL editor. It makes it easier to modify the code.
- The design as a hierarchical tree in the Design view, in a read-only
mode. Note: The Design view is empty. It is deprecated and will be removed in a future version.
- The generated nodes in the Generated Code Structure view. You can accept or reject the choices that are made by the reconciliation.
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.