Rational Programming Patterns

Modifying the code of a Macro

With the Macro COBOL editor, you can create modify, or maintain the COBOL source of your Macros. You can create functions and subfunctions, to identify your code. With the Macro code structure view, you can see the structure of the Macro with the hierarchy of subfunctions. The view menu can be used to display the structure of the Macro in the skeleton of a program retrieved from a model (batch, dialogue, server, client, client monitor, server monitor).

About this task

The code of the Macro must be entered manually in the Macro COBOL editor. The functions and nodes of functions show up instantaneously in the Macro code structure view. You can use the Copy and Paste menus, available by right-clicking in the editor.

In the Macro editor, you can enter COBOL code in any order. For example, you can enter a function F03 after a function F23. 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

  1. Creations and 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 create a working section and linkage for a table file. You must enter a value for the starting line and a line number.
    • You can create a linkage section.
    • You can create a detail line in the PROCEDURE DIVISION. You must enter a function code, a subfunction code, and a line number.
    • You can enter formatted comment lines corresponding to micropatterns. When the instance calling the Macro is generated, these lines will be completed automatically.
  2. Actions specific to some models only:
    • Creation of subfunctions specific to the dialogue or client model

      You can create a subfunction for a Macro retrieved from the dialogue or client model with or without a program skeleton. You must indicate the characteristics of the subfunction. The type of parameters to be updated depends on the type of subfunction. When all the parameters are entered, the Macro Structure code view shows the level of the subfunction.

    • Update parameters (dialogue, client, or server model)

      You can update the parameters of a subfunction with or without a program skeleton. ReadInserting specific code in a Macro

    • Insertion of specific processing in a Macro (server model)

      You can insert specific code at different levels in a Macro called in a server-type Business Component: at the level of a general processing, a Logical View processing, a logical access, or a physical access.

What to do next

Note: The values you must enter in these contexts are given in detail in the online help pages associated with the Macro COBOL editor. You must enter identifiers in the left margin of the editor (column 1 - 6) to position the lines of the Macro at the beginning of a program, in the working area or in the procedure lines of a program when it is generated. The identifiers are documented in the page Syntactical rules in the Macro COBOL editor.

Terms of use | Feedback

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