Micropattern Blocks tab
Each Static Micropattern block is constituted of an ID that can be assigned one or more code lines. In the code of a calling instance (COBOL Program, COBOL Copybook, or Source Code), you call this block through the RPPMPF Static Micropattern, which is dedicated to the Software Development Kit. A block can be called several times in the code of a calling instance. After the instance is generated again, the lines that are associated with the block are automatically inserted in the code.
- A table with the Static Micropattern blocks. Each block is constituted of an ID (01 for example) and possibly the name of a tag that is indicated in the Skeleton Source tag (*TAG:DATA/WORKING for example). Several tags can be associated with the same ID.
- The code lines that are associated with each block (MOVE
A TO B for example). At least one code line must be indicated
for each block. If an ID is associated with several tags, at least
one code line must exist for each of these tags.
The code lines that are associated with a block with no tag will be inserted in the code of the calling instance where the RPPMPF Static Micropattern that calls the block is indicated.
The code lines that are associated with a block with tags will be inserted in the code of the calling instance at the end of the specified tag.
The same ID can then insert code lines at various locations in the code of the calling instance.
- Create an ID. Click Add ID and enter the ID in the ID column of the table.
- Remove an ID. Select an ID in the table and click Remove.
- Add a tag to an existing ID. Select an ID in the table and click Add tag. Enter the tag name in the corresponding column. The tags are indicated in the Source tag of the Skeleton that is used for the generation of the calling instance. You must enter the exact name of the tag, as it is indicated in the Source tab.
- Specify whether the code lines that are associated with a tag
will be inserted only once at the end of the tag, even if the block
is called several times in the calling instance.
When you add a tag, you can select the Unique box to indicate that the lines that are associated with the tag will be inserted only once.
In the Micropattern Block source code, you indicate the code that is associated with each line of the Micropattern Blocks table. You must then enter the code lines that are associated with the ID declaration line, and the code lines that are associated with each specified tag.
You must specify the code lines exactly as they will be inserted in the code of the calling instance. You can use parameters as $param. The parameter will be replaced with its value in the calling instance. This value can be indicated at several levels.
- A parameter that is indicated in a Static Micropattern call in the source of the calling instance,
- A variable that is defined as a property in the Definition tab of the calling instance,
- A variable that is defined as a property in the Definition tab of the Skeleton.