Managing duplicate generated files

Several Program, Screen, or Server instances can have the same external name in a Pacbase Library. Therefore, several files can be generated with the same external name. These duplicates are standardly managed but you can customize this management.

The name of the Program, Screen, or Server instances is unique in a Pacbase Library. However, the same external name can be indicated in several instances. This external name corresponds to the COBOL Program-ID field for Programs and External name field for Screens and Servers in the instance Definition.
Example: Two Programs are named PROGRA and PROGRB. These two Programs have the same external name EXTERN. The files that are generated from these two Programs are then named EXTERN, followed by the extension (cbl and cblpdp for Programs).

When Pacbase data is migrated, the generated files are placed in default COBOL folders. These default COBOL folders are pacprogram, pacscreen, and pacserver if the --separateCobolProject option is specified in the rpp --automaticMigration command or in the folder of the model entity.

When several instances of the same entity have the same external name in a Pacbase Library, and therefore in a Rational Programming Patterns project, the first instance in the alphabetical order of its name is placed in the default COBOL folder. The second instance is migrated to a COBOL folder whose name is the name of the default COBOL folder, followed by 1. The third instance is migrated to a COBOL folder whose name is the name of the default COBOL folder, followed by 2.

Note: The EXTERN.cbl file from PROGRA is migrated to the pacprogram COBOL folder. However, the EXTERN.cbl file from PROGRB is migrated to the pacprogram1 COBOL folder.

You can customize the management of duplicates through a Java extension point. For information, see Customization of the default generation target.


Feedback