Rational Developer for System z

Generating COBOL source from the output of the transformation

The final goal of the UML-to-COBOL process is to generate COBOL source code that can be enhanced further within the development environment of Rational® Developer for System z®.

Before you begin

At this part of the process, the system architect who has been modeling the programs and data structures has been using the capabilities of Rational System Architect, enhanced with profiles containing additional stereotypes, primitive types, and patterns. The second modeling transformation generates the output that is used with Rational Developer for System z to continue COBOL development for System z.

One COBOL source program is generated for each modeled operation in the COBOL-specific model that has been used with the COBOL program pattern. In addition, a copybook is generated for each defined data structure that has the DataObject stereotype applied, and the toCopybook attribute of the stereotype set to true.

Procedure

To set the toCopybook attribute, complete the following steps:

  1. Select the class name in the diagram.
  2. Open the Properties window view.
  3. Under Stereotype Properties, select the DataObject property drop-down menu.
  4. Set toCopybook to True.

Example

The Property window showing the Applied Stereotypes with toCopybook set to True.

What to do next

If the toCopybook attribute is set to false, the data structure is declared in each program as needed.

Feedback