You can create and modify the Macro source code with the
Macro COBOL editor. The input in this editor is made easy by function
and subfunction creation wizards, snippets, and micropatterns. The Macro
code structure view displays the structure of the Macro
with the hierarchy of functions and subfunctions. You can display
the structure in the skeleton of a program that is retrieved from
a selected model.
About this task
The Macro code must be entered in the Macro COBOL editor.
The functions and the unction nodes are instantaneously displayed
in the
Macro code structure view.
Functions
and subfunctions are inserted according to their code. The cursor
position is irrelevant.
You can enter source code in any order
in the Macro editor. For example, you can create a function 22 after
a function 01. In this case, the view shows the hierarchy
of the code in the correct order but the editor and the Macro
code structure view are out of synchronization. The selections
in the tree become inactive. You must then resynchronize the editor
and the view by selecting Synchronize the COBOL source
with the code structure view in the contextual menu of
the editor. This choice is also available in the Macro
code structure view menu.
Procedure
- Modifications common to all models:
- You can modify the level of a function or subfunction. When
they are generated, the functions and subfunctions are set according
to the dependent levels.
- You can modify the characteristics of a function or subfunction
by setting the cursor on one of its lines in the editor and by selecting Update
the function or subfunction.
- Creations common to all models:
- You can insert micropatterns, which are operators with an
added value. When the instance that calls the Macro is generated,
the micropatterns are recognized and the corresponding code lines
are automatically generated. You can also insert snippets, which are
available from the RPP Macro snippets in the Snippets view.
- You can create lines to complement or modify the beginning
of the generated programs.
- You can create work and linkage areas. You can also use the
fragment Work and linkage areas line insertion.
- You can create functions or subfunctions without inserting
them relatively to the automatic functions of subfunctions of a model
in the PROCEDURE DIVISION. You can right-click in
the Macro COBOL editor and select Create a function or
a subfunction. You can also use the fragments Subfunction
with condition and Subfunction without condition.
- You can insert indexes for table searches. You can use the
fragment Indexes insertion.
Note: You must enter identifiers in the COBOL margin of the
editor (columns 1 - 6) to insert the lines in the appropriate position
in the generated program. To know the possible identifiers, see the
help on the code syntax in the Macro COBOL editor.
To know the
information to be entered to insert a function or subfunction, see
the help that is associated with the creation wizard.
- Creations specific to some models:
You can
create functions or subfunctions to insert them relatively to the
automatic functions of subfunctions of a model. If you use the function
or subfunction creation wizard, you must select the model in the Model field
of the first page. Then, you must display the second page of the wizard
to enter the information that is specific to the automatic function
or subfunction.
Note: The values to be entered are detailed in
the help that is associated with each wizard.