These micropatterns are formatted comments that are inserted
in the code of a Program, a Screen, a Server, or a Macro. These comments
call Data Elements that are to be used in the work and linkage areas.
When the Program, Screen, or Server is generated again, these micropatterns
are expanded with the Data Element format or usage from the repository.
Input format
You can insert these micropatterns
in the
WORKING-STORAGE SECTION and
LINKAGE
SECTION of the COBOL code in the
PDP COBOL editor or the
COBOL
Source tab of the Macro editor.
Note: You can
enter the micropatterns in full or use the data entry forms available
from the Rational Developer for System z Snippets view,
in the RPP snippets category.
You
must declare a COBOL data name without any format.
Three types
of micropatterns are specified in the same way. Only the micropattern
identifier differs (
WI,
WE, or
WS).
This identifier determines which of the three Data Element formats
is to be fetched upon the next generation.
Note: The following examples
contain the WI micropattern but they are also valid
for the WE and WS micropatterns.
To
call a Data Element as a work or linkage area, you must enter one
of the two following groups of lines. Both result in the same generation:
*!WI
01 DDSS-DELCO
VALUE SPACE.
or
*!WI
01 DDSS-DELCO VALUE SPACE.
where:
Note: In a Macro, you can parameterize the input, except the
start and end tags. So for example, you can enter:
*!WI
$1
or
*!WI
01 DDSS-DEL$1.
Generated result
When the Program, Macro,
Screen, or Server is generated again, the micropatterns are expanded
with one of the Data Element formats (depending on the micropattern
identifier) or usage. The following lines show examples of expanded
micropatterns after the generation:
- For a Data Element whose format is X and
usage is D: DISPLAY, the following micropattern is
generated:
*!WI
01 DDSS-DELCO
PICTURE X.
- For a Data Element whose format is S9(4) and
usage is 3: COMPUTATIONAL-3, the following micropattern is
generated:
*!WI
01 DDSS-DELCO
PICTURE S9(4) COMP-3.
- For a Data Element whose format is not specified and whose usage is J:
COMPUTATIONAL-6, the following micropattern is generated:
*!WI
01 DDSS-DELCO
COMP-6.