Macro COBOL editor

This editor is used to modify the source code of Macros that are retrieved from different models (batch or client for example). It consists of a source code textual editor, in which you enter the code, and of a Macro code structure view, which displays the nodes hierarchy of the Macro.

You access the Macro COBOL editor from the COBOL Source tab of the Macro design editor. To open it, double-click a Macro instance in the Design Explorer view: the editor opens on the COBOL Source tab by default. You can also right-click and select Open with > COBOL and model Macro editor.

The Macro COBOL editor offers the standard features and characteristics of the COBOL editor.

The Copy and Paste choices are available if you right-click in the editor

Display in the Macro COBOL editor

In the Macro COBOL editor, the code lines are constituted of two parts that are separated by a vertical line. The first part is the line code itself. The second part, which starts from column 73, can contain the following information:
  • A DOT annotation that replaces the 99BL notion that was indicated in the Pacbase Macros. You must not delete it because, upon generation, it adds a dot at the end of the previous significant line. You can enter it manually to add a dot at the end of the previous significant line.
  • A COA annotation for the specific code lines that contained a COA operand in Pacbase.

You can identify the Macro lines with their colors. These colors can be modified in the preferences of the COBOL editor. To open the preferences wizard, select Window > Preferences > COBOL > Editor > Syntax coloring in the menu bar. You can also right-click in the Macro COBOL editor and select Preferences.

Code insertion in the Macro COBOL editor

Code can be inserted easily with micropatterns and snippets. The snippets that are specific to Macros are available from the RPP Macro snippets in the Snippets view. When the instance that calls the Macro is generated, the micropatterns are recognized and the corresponding code lines are automatically generated.

A creation wizard for functions and subfunctions is available if you right-click in the Macro COBOL editor. Functions and subfunctions are inserted in the COBOL code according to their code. You can create them in any order: you can create a function 14 before a function 02 for example. The cursor position is irrelevant. With the wizard, you can insert functions and subfunctions in different ways:
  • Insertion in an absolute mode, with no positioning relative to automatic functions or subfunctions.
  • Insertion relative to the automatic functions or subfunctions of the Standard or client Dialog model
  • Insertion relative to the automatic functions or subfunctions of the Business Component model. The following insertions are possible:
    • Insertion relative to a 05 hierarchical level
    • Insertion relative to the SQL processing
    • Insertion relative to the Logical View processing
    • Insertion relative to the logical access level
    • Insertion relative to the physical access level
Attention: It is recommended to use the wizard to create functions or subfunctions, or change their levels. The wizard automatically reorganizes the end tags (Fffnn-FN) of the existing functions or subfunctions that are impacted by the update. A manual update requires the manual reorganization of these tags.

Feedback