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:
- 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.
- 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.
- 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 .
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.