The generation target of a COBOL Program, COBOL Copybook, or Source Code

By default, the generated files are stored with the design files in a folder whose default name can be changed. However, you can separate them from the design files inside the generation project, or even change the generation project and folder.

What are the generated files?

The generation of a COBOL Program, COBOL Copybook, or Source Code produces the following files:
  • A file that is nested under the instance in the Design Explorer view. The file extension is .cbl for a COBOL Program and .cpy for a COBOL Copybook. For a Source Code, the file extension is indicated in the called Skeleton or is the name of the called Skeleton. If you right-click the generated file and select References > Subreferences, the instances that are involved in the generation are automatically displayed in the References view.
  • A metadata file with the data that is required to generate the instance. The file extension is constituted of the generated design file extension, followed by pdp. For example, the metadata file of a COBOL Program is .cblpdp. The metadata files can be viewed in the Package Explorer view. They must not be edited but must be assigned the same version number as the other generated files.
Note: The name of the generated file is indicated in the instance Definition: COBOL Program ID for a COBOL Program, COBOL Copybook ID for a COBOL Copybook, or Source Code ID for a Source Code. The name of the generated file can then differ from the instance name.

Generation target of the generated files

You can separate the generated files from the design files in the project by indicating a generation root path for them. This path will be taken into account only for the instances that have kept their default generation folder (folder of the design files) in their Definition tab.

To indicate this path, you can click Change project properties in the Definition tab of the instance to be generated. You can also right-click the project in the Design Explorer view or the Project Explorer view (Resource perspective) and select Properties > Root paths properties.

This path is the first level (or levels) of the folders tree for the generated files in the Project Explorer view. In the Definition tab of the generatable instance, it is automatically inserted at the beginning of the Generation folder. For example, if the Generation folder is CAN/IBM/PRO and the root path is gen, the files will be generated in gen/CAN/IBM/PRO.

If you indicate a root path after the generation, the generated files will be immediately and automatically moved to the new target.

Generation target of the metadata files

The metadata files are technical files that contain the location of the design file and information that is required to process the generated code. They can be viewed in the Project Explorer view only (Resource perspective).

You can separate them from the other generated files by indicating a specific root path in the properties of the project. These properties are accessed from the Definition tab of the generatable instance in the Design Explorer view, or from the properties of the project in the Project Explorer view.

However, you must be careful because these files are required to regenerate and edit the code. Moreover, they must be synchronized with the corresponding generated design files. So, you must always upload or download these files together with their corresponding generated files.

If you indicate a root path after the generation, the metadata files will be immediately and automatically moved to the new target.

Changing the generation target

You can also indicate a generation project and folder different from those of the design files. You can then structure your Rational® Programming Patterns projects like IBM® Developer for z Systems™ (Rational Developer for z Systems) projects and easily map them to System z®.

You can select a generation project and folder from the Definition tab of the instance to be generated.


Feedback