The Static Micropattern entity
With this entity, you insert code lines by calling the Software Development Kit dedicated micropattern in the code of a COBOL Program, COBOL Copybook, or Source Code. This particular micropattern is the RPPMPF Static Micropattern. When the calling instance is generated again, the Static Micropattern call is replaced with the corresponding code lines.
In the Static Micropattern, you declare code blocks. Each block is constituted of an ID that can be assigned one or more code lines. These code lines can contain parameters.
When you call the RPPMPF Static Micropattern in the code of an instance, you must indicate the block. If the code lines contain parameters, you must specify their values for this call. You can insert the Static Micropattern from the Snippets view, under RPP SDK Micropattern Snippets.
- The first line contains the following elements:
- *!, which represents the beginning of the Static Micropattern call. The * must be present in column 7, which is dedicated to the comments in the COBOL code, and the ! must be present in column 8.
- The RPPMPF Static Micropattern.
- The details of the block to be inserted. Each value is indicated
between double quotation marks after an equal sign. The following
elements are indicated:
- The project and the package, if any, where the Static Micropattern is stored. If there is no package, "" is indicated.
- The Static Micropattern name, which is indicated when the Static Micropattern is created.
- The ID of the inserted block, as it is defined in the Micropattern Blocks tab of the Static Micropattern.
*!RPPMPF Project="myproj" Package="mypkg" Name="mpname" Id="blockid"
where myproj is the project, mypkg is the package, mpname is the Static Micropattern, and blockid is the block ID.
- If the code line contains parameters, the values of these parameters
are indicated on continuation lines in the following format:
*- Param1="param1_value" Param2="param2_value"
- If the code lines of the ID are associated with a tag, they are inserted at the end of the tag. The tags are present in the Skeleton Source tab. If the Unique option is selected for the tag in the Micropattern Blocks tab of the Static Micropattern, the associated code lines are inserted only once, even if the Static Micropattern is called several times in the code.
- If the code lines of the ID are not associated with a tag, they
are inserted where the RPPMPF Static Micropattern
is called. After the regeneration, the inserted lines are present
in the Generated Code Structure view in the
following format:
RPPMPF_myproj_mypkg_mpname_blockid_nn
where myproj is the project, mypkg is the package, mpname is the name of the Static Micropattern, blockid is the block ID, and nn is the iteration number of the insertion, if the call is inserted more than once in the same code.