Rational Developer for System z, Version 7.6

The derivation principle

Thanks to this principle, you can create a derived instance from a reference instance and then use this derived instance to generate the reference instance without duplicating its design. There are two derivation types: the derivation via the Library substitution and the derivation via the Source inheritance. With the Library substitution type, you create a derived instance to generate the instance from a library different from the one specified in the reference instance. With the Source inheritance type, you create a derived instance which will inherit the complete source code (code generated from the design and specific code) of the reference instance.

Library substitution

This derivation type is available for the following entities: Programs, Screens, Data Structures (for the generation of the Copybooks and the error messages) and Dialogs (for the generation of the error messages).

It is useful when an instance has to be generated from different libraries (ex: a Program which must be generated for the CICS and IMS platforms). It enables you to create a derived instance which points to a reference instance and to a generation library. This derived instance will not contain any design and will enable you to generate the reference instance from another library without duplicating its design.

To create the derived instance, you must use the creation wizard of the entity (for example, you use the Program's creation wizard to create an instance derived from a Program instance). Fill in its required fields and check the Derive box. Then select Library substitution in the Derivation type field and specify the instance it is derived from in the <Entity> to derive field.
Tip: If you leave the Name blank, check the Derive box and enter the reference instance, the name of the derived instance will be automatically initialized with the name of the reference instance. You will just have to complement this name with the library or any other distinctive code. This way, you will be able to easily relate them among all the available instances.

The derived instance is displayed under the same entity as the instance it is derived from, in the same location of the Design Explorer view. If you double-click on it, you will see that it only contains the Overview tab (with a link to the reference instance which contains the design and a link to the generation library) and the Keywords tab.

Then you just have to generate the derived instance. This generates in fact the reference instance but with the parameters of the generation library selected in the derived instance.
Note: If the design of the reference instance has been modified, the generation of the derived instance takes this modification into account, except if the change was only a change of library.

The generated Cobol file will be created, nested under this derived instance. This way, you can keep as many Cobol files of the same instance as there as generation targets.

Source inheritance

This derivation type is reserved for entities in which specific code can be inserted, i.e. Programs and Screens. It is useful when this specific code is distributed among various libraries.

It enables you to create a derived instance which will not contain any design but will point to a reference instance. The derived instance will inherit the complete source code of the reference instance.

When you generate a derived instance created with a Source inheritance derivation type, the following steps take place:
  • The instance referenced by the derived instance is automatically generated. If the design and/or the specific code of this reference instance have changed, these changes are taken into account, and a reconciliation (process which integrates any changes in the design while keeping the specific code) is automatically performed. This step outputs the complete source code (i.e. the code generated from the design and the specific code) of the reference instance.
  • This complete source code is passed on to the derived instance, where it is considered as the generated code. A new reconciliation then reconciles this generated code with the specific code of the derived instance.
Note: If you generate a derived instance, its reference instance is automatically generated again, but the reverse is not true: if you generate a reference instance, its derived instance is not automatically generated.

From the same design of the same VA Pac instance, you can then generate two source files with different Cobol codes. You can repeat these operations from the derived instance, by selecting it as the reference instance of a new derived instance...

The derived instance is very simple since it only contains one field: a reference to the generable instance (a Program or a Screen).

To create the derived instance, you must use the instance's creation wizard of the entity (for example, you use the Program's creation wizard to create an instance derived from a Program instance). Fill in its required fields and check the Derive box. Then select Source inheritance in the Derivation type field and specify the instance it is derived from (this can be a Program, a Screen or the derived instance of a Program or Screen).
Tip: If you leave the Name blank, check the Derive box and enter the reference instance, the name of the derived instance will be automatically initialized with the name of the reference instance. You will just have to complement this name with any distinctive code. This way, you will be able to easily relate them among all the available instances.

The derived instance is displayed under the same entity as the instance it is derived from, in the same location of the Design Explorer view. If you double-click on it, you will see that it only contains the Overview tab (with the reference to the generable instance) and the Keywords tab.


Terms of use | Feedback

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