You can modify the COBOL code of a Macro in a PDP Macro editor, by using
the menu in the Macro tags tree view. In this
view, you can create tagged functions, subfunctions, and working sections
to identify your code. The tags tree can be presented in the skeleton
of a program retrieved from the model you select when you open the
Macro. Some of the choices in the menu of the Tags tree view are specific
to a model and only displays if you open your Macro in the PDP Macro
editor dedicated to the model in which it has been created. The possible
actions in a Macro tags tree are presented here.
A PDP Macro editor is to be opened from a MacroName.cblgen file. This file is saved in the Design Explorer view if the Macro was created locally, or generated in Pacbase and imported into
the Pattern Driven Programming perspective. A
right-click on a MacroName.cblgen file and for exemple, opens the PDP Macro editor which
consists of an editor view and of a Macro tags tree view.
The
Macro tags tree view displays the
structure of a Macro in the form of a tree. You can expand the tree
items with the

icon or collapse the tree items with
the

icon. You can filter the tags tree items
to show a view of the items you want to work on with the text-entry
field (identified by 'type filter text' in figure 1). It is useful
when the tags tree items are numerous.
The Macro editor, located just above the Macro tags tree view,
gives you a dynamic view of the changes you make in the view.
Create a child tag
To create a child tag,
select a node in the tags tree, right-click, and select
Create a child tag. It opens a dialog box where you must
enter the required values depending on the selected node. There are
three possible cases:
- You create a detail tag:
For example, if you create a child
tag from a selected
<SOURCE> node, a line number
is required. If you enter
100 in the
Line number field of the dialog box, the created tag
is
<SOURCE100>.
- You create a child tag from a selected <IOSEC-FILECTRL> or <FILE> tag in the tags tree. Then the
required value is a file code which must be two characters long:
- If you create a child tag from a selected <WORKING> or <SUITE-WORKING> node, you must enter a
starting line and a line number:
- Starting line
- In the Starting line field, the required
value consists of two numeric characters.
- Line number
- In the Line number field, the required
value consists of three numeric characters.
Rename tag
To rename a tag, select a tag
in the Macro tags tree, right-click and select Rename tag. In the wizard that opens up, you can modify the Subfunction
code and the Line number.
Remove a tag
To remove a tag, select a tag
in the tree, right-click 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 selected lines are grouped on the first tag of
the selection.
- Select lines (for example 100, 200 and 250) in the body of a function
with the Shift key, and right-click to select Regroup tags:
- As a result, you find the following structure in the tags tree:
Update level
You can modify the level of
a function or subfunction from the
Macro tags tree:
- Right-click on a function or subfunction and select the Update level choice.
- In the dialog box that opens, enter a value in the Level field:
As a result, the functions or subfunctions are set according
to the dependent levels.
Create a linkage or a working
You can create
a working only in a standard Tags tree view, this choice is not available
in the menu if you edit a skeleton in the Tags tree. To Create working:
- Right-click in the tags tree where you want to insert a working
and select Create a working or a linkage.
- In the dialog box that opens, enter a starting line and a line
number.
- Starting line
- In the Starting line field, the required
value consists of two numeric characters.
- Line number
- In the Line number field, the required
value consists of three numeric characters.
According to the value defined for the starting
line, the tag will be positioned in the appropriate place. It can
produce a linkage if a 'Linkage' tag exists and if the position entered
in the Starting line and Line number fields is greater than that of the linkage.
Generation/no generation
With this command,
you can put a tag on functions you want to generate. Right-click on
a function and select no generation/generation. A blue SUP tag is displayed on the left side of the function
node. If you right-click a function tagged for generation, and select no generation/generation, the tag is removed and the
function is not generated.
Override a tag
This choice is available
in the Tags tree only if you edit a skeleton. To override a tag, move
your cursor to a node in the tree, right-click, and select
Override tag. This action is possible only on some of
the tags depending on the selection context:
Create the linkage section
This choice is
available in the Tags tree only if you edit a skeleton. You create
a linkage from a selected
<DATA> tag. Then in
the dialog box that opens, you must indicate the position of the linkage:
- Starting line
- In the Starting line field, the required
value consists of two characters, which must be numeric if it does
not start with the $ value.
- Line number
- In the Line number field, the required
value consists of three characters, which must be numeric if it does
not start with the $ value.
Other actions
Other choices are available only
with the dialog and client model or the server model. For more details,
read the Creating specific dialog or client subfunctions and Insertion of specific code in a Macro pages associated
with this help page, by clicking the Associated references link.
Important: Tags are very important for the structure
of a program. They are used to merge Macros, and to merge a Macro
with a program. So, if the parameters of a Macro have been modified,
the program must be generated again.