Rational Programming Patterns for System z

Generating and modifying the COBOL of a Program, Screen, or Server

You can generate a Program, Screen, or Server either in Pacbase or in Rational Programming Patterns for System z (local generation). If you generate in Pacbase, you obtain a complete generated code. This code 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 locally, you generate the code produced by the generation of the design only. Store the file produced by the Pacbase generation with the design files (default), or in the COBOL target indicated on the Definition of the generated instance. If you generate the instance locally, the PDP COBOL editor clearly differentiates the specific code from the generated code. You can then modify the specific code or add specific changes. You can also 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

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 Package Explorer 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, see the link which explains the generation target of a Program, Screen, or Server.
To see and modify the generated code, right-click the .cbl file and select Open with > PDP COBOL editor. You can then view the instance:
  • Generated code in the PDP COBOL editor. This editor offers additional functions, on top of the ones that are already provided by the standard COBOL editor, which helps you modify the code.
  • Design as a hierarchical tree in the Design View. Dedicated wizards help you modify the Program, Screen, or Server design.
  • Generated nodes in the Generated Code Structure view and accept or reject the choices made by 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 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.
Note: Some micropatterns and snippets, which are microgenerators, make it easier to enter some specific changes.
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 and will gray the corresponding lines.
To specify enhancements or correct bugs which require changes in the design
  1. Go to the Design View. Modify the design, save it and generate the instance again to trigger the reconciliation
  2. 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).
Note: The PDP COBOL System z LPEX editor is still available but it is advisable to use the PDP COBOL editor.

Terms of use | Feedback

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