Duplicating a Program, a Screen, or a Server

When a Program, Screen, or Server is duplicated, all the associated generated files (metadata file, COBOL file, and Screen map file) are also duplicated. To open the duplicating wizard, select a Program, Screen, or Server in the Design Explorer view and select Duplicate in the contextual menu.

When you open the duplicating wizard, various fields display the values of the initial instance. You must modify some values, which must be unique.

Design project
This field must contain the target project for the duplication of the design.

The initial project is selected by default but you can select another project in the drop-down list. This list displays the target projects whose required projects are the same as those of the initial project. Then, all the references will be resolved in the new project.

Design entity name
This name must be unique. You must then modify the name that is displayed when you open the wizard because this name is the name of the initial Program, Screen, or Server.
COBOL project
This project is the target project for the duplication of the COBOL file.

The project that is displayed when the wizard opens is the project from which you started the duplication. You can select another project in the drop-down list. This list displays all the projects of the local workspace.

COBOL folder (folder 1/folder 2)
This field is available only if a COBOL directory is indicated in the properties of the initial project to replace the default rpp value.

In this case, this field displays, by default, the folder that is indicated in the initial project. You can enter another folder as a name or a file path. If the new folder does not exist, it is automatically created.

However, it is advised to keep the default folder to group all the generated files in the same folder.

COBOL name (PROGRAM-ID)
This name is the name of the target generated file. It can be different from the instance name.

This name must be different from the COBOL name of the initial instance, whose unicity is based on the concatenation of the project, the folder, and the PROGRAM-ID. It must not already be used in the project.

Map project
This field is available for a Screen only.

This project is the target project for the duplication of the map file.

The project that is displayed when the wizard opens is the project from which you started the duplication. You can select another project in the drop-down list. This list displays all the projects of the local workspace.

Map folder (folder 1/folder 2)
This field is available for a Screen only.

Moreover, it is available only if a map folder is indicated in the properties of the initial project to replace the default rpp value.

In this case, this field displays, by default, the folder that is indicated in the initial project. You can enter another folder as a name or a file path. If the new folder does not exist, it is automatically created.

However, it is advised to keep the default folder to group all the generated files in the same folder.

Map name
This field is available for a Screen only.

This name must be different from the map name of the initial instance. It must not already be used in the project.

Indicate the required values and click Finish.

For Programs and Servers, the duplicated design and COBOL code have the same subreferences as the initial design and COBOL code. The duplication modifies all the appropriate fields in the target COBOL code. Then, you can use the target COBOL file as is.

For Screens, the duplication does not modify the Screen name in the parameters of the Macros that are called in the Screen. So, you must open the - CP Lines tab of the Screen and enter the new name in the appropriate parameters of the Macro. You must then generate the Screen again.


Feedback