Rational Programming Patterns for System z

PDP Macro editor

In the PDP Macro editor, you can modify the COBOL code of a Macro in one of the different models available (batch, dialog, client screen, client monitor, server and server monitor). You can insert functions, subfunctions, insert formatted comments for micropatterns in the function lines, and you can complement the standard processing of the COBOL DATA DIVISION by using tags. You create and manage tags in the Macro tags tree and complement or modify the COBOL code in the editor view.

The PDP Macro editor is displayed when you open a MacroName.cblmsp file. This file is saved either in the Design Explorer view if the Macro was created locally, or in the Package Explorer view if the Macro was generated in Pacbase and imported into the Pattern driven programming perspective. To open a PDP Macro editor, you must right-click a MacroName.cblmsp file and select one of the options available, for example: Open with > PDP Macro editor - batch model. In the PDP Macro editor which opens, you find an editor view and a Macro tags tree view.

Macro editor view

The Macro editor view is used to enter code, modify, delete lines in a generated Macro file. It offers the standard editing functions and features of COBOL Editor (program parsing, view filtering...) and with a system of colors, it enables you to clearly identify lines and tags in the Macro code. The Macro editor view looks like in Figure 1
Figure 1. PDP Macro editor
Macro editor view
The lines in the Macro code are identified by different colors:

All these colors can be modified in a wizard accessible with Window > Preferences > COBOL > Editor > Parser styles.

Using the pop-up menu, you can display the tags or hide them. Right-click in the Macro editor and select Macro > Filter view > With tags or Without tags.

The editor instantly displays all the updates performed in the Macro tags tree view. When you select a tag in the tree, the item selected is highlighted in the Macro editor.

Remember: You can insert formatted comments which correspond to micropatterns. When the instance calling the Macro is generated, these comment lines are recognized and automatically completed. You can thus easily manage the iterations in a Program, a Screen or a Server.

Macro tags tree view

The Macro tags tree tab looks like in Macro tags tree view
Figure 2. Macro tags tree view
Macro tags tree view in the PDP Macro editor

In the Macro tags tree, you can display a program skeleton. To do so, click Edit skeletonEdit skeleton in the Macro tags tree view toolbar. It displays the Macro tags tree in the skeleton of a program retrieved from the model you selected when you opened the current Macro. In figure 2, this is the PDP Macro editor - dialog model) which was selected. So the Macro tags tree is displayed in a Pacbase program skeleton for batch. Clicking the button again makes the view turn into 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 pop-up menu are available only for specific items selected in the tree. For example, the Create specific dialog subfunction command is available only for a dialog function selected in a Macro editor for dialog model.

From the toolbar, you can expand the tree items with the Expand all icon or collapse the tree items with the Collapse all icon.

You can filter the list of nodes in the tags tree view. To do so, you must enter characters in the field which is just before the list of nodes. You can use the '*' and '?' Wildcard characters in the string. When you type something in the field, a button is displayed beside the field. Clicking this button clears the field and the list is displayed as it was formerly with no filter applied.

You can filter the tags tree items to show a view of the items you want to work on with the filter field just before the tags tree. 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 updates.

From the pop-up menu of the Macro tags tree view, you can perform a number of standard operations depending on the item selected in the tree:
  • Remove tag,
  • Override tag,
  • Create a child tag,
  • Rename tag,
  • Regroup tags,
  • Create a detail line in procedure division,
  • Create the linkage section,
  • Create a working or a linkage,
  • Create function/subfunction,
  • No generation/generation,
  • Update level,
  • Create a function/subfunction.
And other actions specific to the model chosen when you open the editor (dialog, client screen or server models).
  • Update parameters (specific to the dialog/client screen and server models),
  • Insertion at the level of a general process (specific to the server model),
  • Insertion at the level of a Logical View (specific to the server model),
  • Insertion at the level of a logical access (specific to the server model),
  • Insertion at the level of a physical access (specific to the server model).

Terms of use | Feedback

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