Rational Developer for System z

Describing a basic control flow of a program

You can associate an activity diagram to an operation. Since the operation represents the program (or an entry point of a program), this is how you describe some elements of the logic of the program.

About this task

To describe some elements of the logic of the program, complete the following steps:

Procedure

  1. In the Project Explorer view, use the context menu to highlight the operation and select Add UML > Activity Method.
  2. A few stereotypes for basic functions that a program can perform are provided in the COBOLProfile profile. Add that profile to your model if needed, by using the Details tab of the model editor.
  3. Design your activity diagram by using the nodes provided in the palette, for example, initial node, action node, decision node, or merge node.
  4. The stereotypes provided by the UML-to-COBOL process provide additional semantics to the action node in order to represent I/O operations against resources or CALL statements. To add the COBOL stereotypes to a selected activity node, use the Apply Stereotypes button in the Properties view.

What to do next

Figure 1 shows the list of available stereotypes for the action nodes.
Figure 1. Apply Stereotypes window
The check boxes are Call, Close, Delete, Open, Read, and Write.
You will obtain a diagram like the example shown in Figure 2 in the simple case of a program that opens and closes a Resource.
Figure 2. Activity1 diagram
The diagram shows an "«Open» OpenFile" box connected by an arrow to a "«Close» CloseFile" box.

Note: Refer to Rational® Software Architect documentation for general information about Rational Software Architect modeling.

You can indicate which resource the activity manipulates through dedicated properties of the stereotype as shown in Figure 3.

Figure 3. Applied Stereotypes window
The window shows an Open stereotype with two properties: resource with value ORDERTOPROCESS and reverse with value False.

Feedback