The PDP macro editor enables you to enter and modify the
COBOL code of a Macrostructure. You can create tagged fonctions/sub-functions,
workings.. from the Macrostructure tags tree view in the skeleton of a program retrieved from the model you have
chosen when opening the macro, it can be the PDP macro editor for a batch model or for a dialog model.
You can open the PDP Macro editor from a MacroName.cblgen
file which is saved either in
Design Explorer view if the macro has been created locally or in the
Navigator view if the macro has been generated in VA Pacbase and imported
in the Design pespective. A right-click on a
MacroName.cblgen file and opens the PDP Macro editor which consists of an editor view and
of a macrostructure tags tree tab.
In the Macrostructure
tags tree, you can display a program skeleton.
To do so, click the
icon in the macrostructure tags tree view's toolbar, it displays the macro tags tree in the skeleton
of a program retrieved from the model you have chosen when you opened
the current macrostructure. Here, in figure 1, as we have selected
the PDP Macro editor (batch model), it displays
the macro tags tree in a Pacbase program skelton for Batch. Clicking
the button again would make the view turn to the default display.
The green tags in the tags tree can be updated. You can then
work directly in this view by selecting nodes in the tree. The choices
in the popup menu are available only for specific items selected in
the tree. For example, the Create specific dialog sub-function command is available only for a dialog function selected in a macro
editor for dialog model.
You can expand the tree items via the

icon or collapse the tree items via the

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
just above the tags tree. 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.
Override a tag
To override a tag, position
your cursor on a node in the tree, right-click to select Override tag. This action is possible only on some of
the tags depending on the selection context:
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 node selected. There are three possible cases:
- You create a detail tag:
For example, if you create a child
tag from a selected<SOURCE> node, it is a line
number that 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, in the dialog box
that opens, you must 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.
Remove a tag
To remove a tag, you only have
to select the tag in the tree, right-click and select Remove
tag. It is removed from the tags tree and you can see
in the macro editor view that the corresponding line has been removed.
Create a linkage
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 value required
consists of 2 characters, numeric if it does not starts with the $ value.
- Line number
- In the Line number field, the value required
consists of 3 characters, numeric if it does not starts with the $ value.
Update level
You can modify the level of
a function or sub-function. To do so, select a function or sub-function,
right-click and choose Update level. Then,
in the dialog box that opens, enter a value for the level of the function/sub-function:
As a result, the functions or
sub-functions are positioned according to the dependent levels.
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.
- The sub-function code is optional, it is only required if you
want to create a sub-function. 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 skeleton view. Right-click in the tags tree and select Create specific dialog sub-function. 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 a skelton or with no skeleton view. Right-click on a sub-function
and select the Update parameters (specific dialog) choice. 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.