Rational Programming Patterns for System z

Modifying the code of a Macro in a PDP editor

You can either modify a Macro imported or created in the Design Explorer view. In both cases, a file with the .cblmsp extension must be edited so that you can enter and modify the COBOL code in the Macros. The PDP Macro editor dedicated to the batch, dialog, server or other available model, helps you to enter marked-up COBOL code with the use of tags, an important functionality. The COBOL code in output will be clearly identified when generating the program in which the Macros are called.

Creating a Macro

When you create a Macro from the Design Explorer view, you can generate the Macro, even if it does not contain any COBOL code yet. You initialize a MacroName.cblmsp file that you can then edit. More details on how to create a Macro can be found in the topic dedicated to the Macro editor.

cblmsp files

With PDP, you can modify the COBOL code of a Macro from a MacroName.cblmsp file in a dedicated editor. You can import files which have been generated in Pacbase. In that case, you need to import the Macro file with a .ta2 format into the Design Explorer view. You will have to dispatch the .cblmsp output file of the Macro in the same view, in the same location if the output file of the Macro generated contains the code of more than one Macro. Otherwise, if you create a Macro in PDP, you must generate a .cblmsp file by right-clicking on the Macro and selecting Generate > cblmsp generation in the Design Explorer view. The output file is then saved in the list of Macros in the Design Explorer view. For more details, read the page on the Design Explorer view.

The files imported from Pacbase might contain the code of more than one Macro. In PDP, a wizard enables you to request the creation of as many .cblmsp files as there are Macros in the generated file. To open this wizard, right-click on a selected .cblmsp file and select the Dispatch Macro choice, You can find the details on how to dispatch a Macro in the Design Explorer view page, in the Dispatching Macros section.

PDP Macro editors

Once the MacroName.cblmsp file is generated or copied in your workspace, you can edit the file in a Macro editor. You can select a batch model editor or a dialog model editor. To open the file in one of these editors, right-click the MacroName.cblmsp file, and select Open with > PDP Macro editor (batch model/dialog model).

In the PDP Macro editor, you can modify the Macro COBOL code, and write your procedures. In this editor, you must create tags so that the COBOL code in your Macro can be easily identified when you generate your program. A PDP syntax highlighting system, on top of the COBOL editor coloring, enables you to identify the source of the lines retrieved from the model versus tag lines or comment lines. Read the topics associated with this page to have more details on how to use the PDP Macro editors.

Tags

Tags are very important, as they are used to merge Macros together and to merge a Macro with a program. With the tags, the functions/subfunctions and Working-Storage Sections are clearly identified in a Macro. In the PDP Macro editor, a Macro tags tree view helps you to insert tags as functions/subfunctions, Working-Storage Sections, linkage sections, detail lines in a Procedure Division. In this view, you can also update the level of a function or subfunction and the parameters of a dialog subfunction. Moreover you can manage the tags of the Macro by regrouping tags, deleting tags, overriding tags, creating child tags.

Your Macros must be called in a program and the program must be generated to take your Macros into account.

Terms of use | Feedback

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