Definition tab
In this tab, you can specify the generation target of the instance. You can also assign values to variables that are declared in the Skeleton, or define properties and assign them a value that will be taken into account upon generation.
Generation target
By default, the generated files are stored with the design files in a root folder whose default name you can change. You can separate them from the design files or even change the generation project and folder.
- Generation project
- The files that are generated from this instance are stored in the project that is displayed in
this field.
The project of the corresponding design file is the default project. If it is kept, Default is displayed between parentheses next to the project. However, if it is explicitly changed in the instance, only the project is displayed in this field, without any other indication.
You can select a new project in the list.
If you change the project, the generation folder is automatically set to the default value (rpp). The new project then applies to the next generation.
- Generation folder
- The files that are generated from this instance are stored in the folder that is displayed in
this field, inside the project from the previous field.
The folder of the corresponding design file is the default folder. If it is kept, Default is displayed between parentheses next to the folder. However, if it is explicitly changed in the instance, only the folder is displayed in this field, without any other indication.
If the default folder is kept, you can specify a root path for the generated files in the Properties wizard (accessed by clicking Change project properties). This path is automatically inserted in this field, at the beginning of the folder.
You can select a new folder in the list. Creating a folder is impossible at this stage. Folders must have already been created in the project, for example from the Resource perspective.
If you change the folder, it then applies to the next generation.
- Change project properties
- Click to open the Properties wizard, where you can complete the following actions:
- Change the default folder. This folder contains the design files and is the default target of the generated and metadata files.
- Indicate a root path for the generated files, if the default generation folder has been kept.
- Indicate a root path for the metadata files, which are stored by default in the same folder as the other generated files.
- COBOL Program ID or COBOL Copybook ID
- This field is named COBOL Program ID in
a COBOL Program and COBOL Copybook ID in a
COBOL Copybook.
You can indicate the name of the file that is generated from the instance. This name can be different from the instance name.
This name will be found in the PROGRAM-ID paragraph of the COBOL source.
Properties
You can define properties that will be replaced, when the COBOL Program or Copybook is generated, by the values that are indicated in this table. You can also specify a default value for a property that is declared in the Skeleton.
- The property name (mpcode for example),
- The default value of the property (MP01 for example),
- The property description (Micropattern code for example).
A property can be defined at several levels.
- A parameter that is indicated in a Static Micropattern call in the source of the calling instance,
- A variable that is defined as a property in the Definition tab of the calling instance,
- A variable that is defined as a property in the Definition tab of the Skeleton.
Some properties are predefined:
- currentDate: This property will be replaced with the generation date and time. The format varies according to the launching language of the Rational® Programming Patterns client (for example: 11/18/14 3:59 PM or 21/11/14 14:59).
- localUser: This property will be replaced with the ID of the user who is connected to the local operating system.
- name: This property will be replaced with the name of the generated instance.
- label: This property will be replaced with the label of the generated instance.
- sourceCodeId: This property will be replaced with the sourceiId attribute of the generated Source Code instance.
- programId: This property will be replaced with the programId attribute of the generated COBOL Program instance.
- copyId: This property will be replaced with the copyId attribute of the generated COBOL Copybook instance.