Rational Developer 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 (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

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 Open with > PDP COBOL system z LPEX editor. You can then view the Program/Screen/Server:
  • Generated code in the PDP LPEX COBOL editor. This editor offers additional functions, on top of the ones that are already provided by the standard Rational Developer for System z LPEX editor, which helps you modify the code.
    Note: The help on the PDP LPEX COBOL editor is available by pressing F1 from the command line (the line which contains the column numbers). The help on the standard LPEX COBOL editor is available from the code lines.
  • Design as a hierarchical tree in the Design View. Dedicated wizards help you modify the Program/Screen/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. 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
  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).

Terms of use | Feedback

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