Rational Developer for System z, Version 7.5

Modifying a Macrostructure (no skelton view)

You modify the code of a macrostructure in the Macrostructure tags tree view. In this view, you can perform such actions as creating tags, creating new functions and sub-functions, creating working sections... The tags tree can be presented in the skelton of a program retrieved from the model you choose when you open the macro, or with no skelton view, which is the default display for this view. We present here the actions possible in a macrostructure tags tree with the default display.

To access the Macrostructure tags tree view, open a .cblgen file in the Navigation view from the Design perspective via the Open with choice in the popup menu. Then select a macro editor corresponding to the model you are working on PDP macro editor (batch or dialog model).
The Macrostructure tags tree view displays the structure of a macro in the form of a tree. You can expand the tree items via the Expand all icon or collapse the tree items via the Collapse all icon. You can filter the tags tree items to show a view of the items you want to work on via the filter input field (field identified by 'type filter text' in figure 1). It is quite useful when the tags tree items are numerous.

The macro editor, located just above the Macrostructure tags tree view, gives you a dynamic view of the updates you make in the view.

Create a child tag

To create a tag in the Macrostructure tags tree,

  1. Position your cursor on a line in the body of a sub-function for example, right-click and choose Create a child tag
    Example: in the body of a sub-function, you can create a detail line.
  2. Then, in the dialog box that opens, enter a line number:

Line number
In the Line number field, the value required must contain 3 numeric characters.

When a new line is created, it is linked to the one-level higher tag.

Delete tags

To delete a tag, right-click on the line you want to remove in the Macrostructure tags tree and select Remove tag. As a result, the line is deleted from the tags tree and you can see in the editor that the line has been deleted.

Regroup tags

You can regroup detail lines in your macro. The lines selected are grouped on the first tag of the selection.

  1. Select lines in the body of a function, use the Shift key, for example 100, 200 and 250 and right-click to choose Regroup tags:
  2. As a result, you find in the tags tree, the following structure:

Update level

You can modify the level of a function or sub-function from the Macrostructure tags tree:
  1. Right-click on a function or sub-function and select the Update level choice.
  2. In the dialog box that opens, enter a value in the level field:

As a result, the functions or sub-functions are positioned according to the dependent levels.

Create a working

To Create a working :
  1. Right-click in the tags tree where you want to insert a working and select Create a working.
  2. In the dialog box that opens, enter a starting line and a line number:
Starting line
In the Starting line field, the value required consists of 2 numeric characters.
Line number
In the Line number field, the value required consists of 3 numeric characters.

According to the value defined for the starting line, the tag will be positioned to the appropriate place, which means that it can produce a linkage if a 'Linkage' tag already exists and if the position chosen via the values entered in the Starting line and Line number fields is higher to that of the linkage.

Create a function/sub-function

You can create new functions and sub-functions. Select a line in the Macrostructure tags tree and right-click to choose Create function or sub-function. In the dialog box that opens, complete the fields with appropriate values:
Function code
The function code is mandatory, it must be two characters long.
Sub-function code
The sub-function code is optional, it is only required if you want to create a sub-function. It must be two characters long.
Level
The level value is optional, it must be two characters long. Numeric characters are required only if the level starts with the $ value. If no value is entered in this field, it is automatically set to 05 for a function created and to 10 if it is a sub-function that is created.
Other possible levels for a sub-function: from 06 to 98.
Within a given function, a 15-level sub-function is part of the 06- to 14-level sub-functions which precede it. In other words, a sub-function of a logically lower level will have a greater level number. A dependent sub-function will be executed only if its higher-level (sub)function is executed. 99 is used to write a condition without changing the sub-function code. This condition applies until the next occurrence of a 99 level or until the end of the sub-function. A 99 level procedure is limited to 75 lines. A sub-function can contain a maximum of 98 - 99 levels.

Create specific dialog sub-function

This choice is active in the popup menu of PDP macro editor for a dialog model only. You can create a sub-function from a tree tag with a skelton view or with no skelton view. Right-click in the tags tree and select Create specific dialog sub-function in the popup menu. It opens the 'Create a sub-function' dialog window in which you can enter the characteristics of the sub-function. The type of parameters which can be updated depends on the type of sub-function selected in the Function choice field. Once all the parameters are completed, click OK and the tags tree displays the new sub-function before, after or in place of the selected sub-function depending on what is specified in the dialog window. A new line appears in the macro editor view for the new sub-function.

Update parameters (specific dialog)

This choice is active in the popup menu of PDP macro editor for a dialog model only. You can update the parameters of a sub-function from a tree tag with skelton or with no skelton. Right-click on a sub-function and select Update parameters (specific dialog) in the popup menu. It opens the 'Update sub-function' dialog window in which you can modify some of the parameters specific to the sub-function you have selected.
Important:
The role of tags is very important for the structure of a program as they are used to merge macros, and to mix a macro with a program. So, once the macro parameters of a program have been modified, the program must be generated again.
Related reference
Macrostructure tags tree view
Create/update dialog sub-functions wizard

Terms of use | Feedback

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