You can generate a Program, Screen or Server either in Pacbase or in Rational Programming
Patterns for System z (RPPz). If you generate in Pacbase, you obtain a complete
generated code, which includes both the code produced by the generation
of the design, and the code produced by the generation of the specific
insertions. If you generate in RPPz you only generate the code produced
by the generation of the design. If you put the file produced by the Pacbase generation in the
adequate location in RPPz (with the design files by default, or in
the COBOL target indicated in the Definition tab
of the generated instance). and if you generate the instance in RPPz,
the specific code will be clearly differentiated from the generated
code in the PDP COBOL
LPEX editor. You will then be able to modify the specific code or
add specific changes. You will also be able to modify the design and
generate again. The generation process always keeps your specific
code, while taking all the design modifications into account: This
process is called the reconciliation.
Procedure
- If you
create a Program, Screen, or Server in RPPz, you must:
- Specify its design in the dedicated design editor. You
open this editor by right-clicking the instance and select Open.
You can also double-click the instance.
- Generate it by right-clicking it and selecting (or , or ).
- You can also generate and work on a Program, Screen, or
Server which exists in Pacbase. You must then perform
the following steps:
- To see and modify its design in its dedicated editor,
you must have imported it from Pacbase or loaded it from
Rational Team Concert.
- You must generate the instance in Pacbase to obtain a fully
generated code which includes both the code produced by the generation
of the design, and the code produced by the generation of the specific
insertions..
- You must first see whether it calls Macros. If it does, you must
first generate these Macros in Pacbase. Generating the
Macro code is a prerequisite. You obtain a .cblgen file
which contains the tagged code of the Macro.
Use the Dispatch
Macros choice, available from the contextual menu of the Design
Explorer view, in order to import the Macro files into
the location. If the files contain the code of more than Macro, one .cblgen file
is created for each Macro.
- Then you must generate your Program, Screen, or Server in Pacbase and
- You must then generate the Program/Screen/Server design
(.cbl file) in RPPz. This generation is required
and does not override the .cbl file produced
by the Pacbase generation.
To generate in RPPz, right-click on it in the Design Explorer view
and select , or .
Once you have performed both
the Pacbase and
RPPz generations, the generated code (which comes from the design)
can be differentiated from the specific code. Then you can always
modify the design of an instance which contains specific code. After
generating the instance again, 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 locations of the specific code insertions will move
to fit the new design at best. This process is called the reconciliation.
Results
The generation produces:
- A .cbl file, nested under the Program, Screen,
or Server instance in the Design Explorer view.
- For a Screen, the map description file (.bms, .mfs,
or .map), nested under the Screen instance in
the Design Explorer view.
- The metadata file of the generated design (.cblpdp)
and of the map (.mappdp). These files can be
viewed in the Navigator view.
Important: These files are generated under the
name indicated in the COBOL program ID (for
Programs) or Program external name (for Screens
and Server) of the Definition. The name of the
generated file can then differ from the instance name.
By default,
the generated files are stored with the corresponding design files.
However you can indicate a root path to separate the generated files
from the design files in the generation project. You can also change
the generation project and folder. For information, refer to the link
below, which explains the generation target of a Program or a Screen.
To
see and modify the generated code, right-click the
.cbl file
and select . You can then view the Program/Screen/Server:
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 must modify it.
Modifying the generated code includes inserting code in the generated
code, removing, or overwriting parts of it. The changes you make in
the generated code are called specific changes. When you enter a specific
change in the PDPCOBOL
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 and will gray the corresponding
lines.
To specify enhancements or correct bugs which require
changes in the design
- Go to the Design View. Modify the design,
save it and generate the instance again to trigger the reconciliation
- Then go to 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 (that is validate
or reject the choices made by the reconciliation).