Rational Developer for System z, Version 7.6

How to manage your Macrostructure in PDP

With PDP you can work with macrostructures retrieved from VA Pac or you can create new macrostructures but you describe only the -W lines. The macrostructures must be generated. Then, the COBOL code of the macrostructure can be modified and completed in a PDP macro editor dedicated to the batch or model dialog.

Creating a Macrostructure

When you create a new Macrostructure in the Design Explorer view, you must complete the -W lines tab to modify the WORKING STORAGE and/or LINKAGE sections, and then you must generate the Macrostructure. The output file is a MacroName.cblgen file which can be edited. The procedures describing how to create and generate a macrostructure are to be found in the topics dedicated to Macro editor and the Design Explorer View.

gcblgen files

In PDP you can modify the COBOL code of a macrostructure from a MacroName.cblgen file in a PDP editor. This file can be imported from VA Pac or created locally. You can import macrostructures which have been generated in VA pac. You just have to import the macrostructure in the Design Explorer view and copy the MacroName.cblgen output file in the Navigator view. If you create a macrostructure in a PDP editor, you can generate a .cblgen file via the Generate > cblgen generation menu in the Design Explorer view. The file is saved under the macrostructure instance in the Macro branch.

Files imported from VA Pac may contain the code of more than one Macro. output of the Macro generation in VA Pac contains the code of more than one Macro. In PDP, a wizard enables you to request the creation of as many cblgen files as there are Macros in the generated file. To open this wizard, right-click on a selected .cblgen file and click on 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 editor

Once the MacroName.cblgen file is generated or copied in your workspace, you can edit the file via a PDP macro editor, given the model under which the macro was created, you have the choice between a Batch model editor or a dialog model editor. To open the file in one of this editor, right-click on the MacroName.cblgen file, and choose Open with > PDP Macro editor (batch model/dialog model).

The PDP macro editor enables you to view, to modify the Macro code and to write your procedures. In the PDP editor, you muste create tags so that the COBOL code in your macrostructure can be easily identified when you generate your program. A PDP coloring system, on top of the LPEX coloring, enables you to identify the source of the lines (generated lines versus Tags lines).

Tags

The tags are very important as they are used to merge macrostructures together and to merge a Macrostructure with a Program. With the tags, the functions/sub-functions and working storage sections are clearly identified in your macrostructure. In the PDP macro editor, a macrostructure tags tree enables you to create and organize the tags and via other contextual menus, you can create functions, working storage sections, create linkages and detail lines in a procedure division, update levels and parameters...

Your macrostructures must be calles in a Program and the Program must be generated to take into account your macrostructures.

Terms of use | Feedback

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