Rational Programming Patterns

Modifying the internal resources of a batch or online program

The internal resources of a batch or online program are its work or linkage areas. You can replace their automatically generated descriptions by calling Data Structures or Data Elements in the work and linkage areas. To do so, you specify micropatterns directly in the COBOL code of the generated instance.

Before you begin

To specify a micropattern, the instance in which you want to insert it must have been generated.

About this task

The purpose of a micropattern is to call a Data Element or Data Structure that is used as a work or linkage area.

You can organize the inserted internal resources exactly as you want to in the COBOL code. You can group them in the same place to make the COBOL code easier to read and maintain, or sort them in a special order.

Procedure

  1. In the Design Explorer view, right-click one of the following files:
    • The .cbl file of a Program, Screen, or Server and select Open with > PDP COBOL editor.
    • A Macro. Select Open with > COBOL and model Macro editor. You can also double-click a Macro instance. By default, it opens on the COBOL source tab.
  2. Place the cursor where you want to insert the micropattern, in the WORKING-STORAGE or LINKAGE section, and add a line.
  3. Enter the micropattern as a formatted comment that calls a Data Element or Data Structure used as a work or linkage area.

    You can enter as many micropatterns as you want in the COBOL code of an instance.

  4. Generate the instance to which you added one or more micropatterns. You can do so from the Design Explorer view (right-click this instance and select Generate) or from the Design view (with the Generate the code and start the reconciliation button).

Results

When the generation is finished, the micropattern is expanded in the COBOL code with information fetched from the repository.

Terms of use | Feedback

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