The GFT and GDI micropatterns
make it possible to manage, from a Macro, the iterations in the Program,
Screen or Server which calls this Macro. When the calling instance
is generated, the micropattern is automatically expanded in the generated
COBOL code.
GFT branches to the end of the iteration.
whereas GDI branches to the beginning of the iteration.
Input format
You enter these micropatterns
in the Macro editor adapted to the model. The input format is identical
for both micropatterns, except for the micropattern identifier:
*{Gxx
*}
where:
- *{ is the required start tag of the micropattern.
The * must be entered in column 7, reserved for the
comments in the COBOL code, and the { must be entered
in column 8.
- Gxx is the micropattern identifier: GFT or GDI.
- *} is the required end tag of the micropattern.
The * must be entered in column 7, reserved for the
comments in the COBOL code, and the ] must be entered
in column 8.
After the calling instance is generated, the micropattern
is expanded according to the entity type and to the function into
which the Macro is called.
Generated result for GFT
In
a generated Program,
GFT sets the end-of-file processing
switches and branches to the end-of-run function (
F20):
MOVE ALL ‘1' TO FT GO TO F20.
In a generated Screen (standard or client Screen),
GFT branches
to the end of the category processing.
- In a function < F39, GFT produces:
GO TO F39999-ITER-FT.
- In a function > F39, GFT produces:
GO TO F69999-ITER-FT.
In a generated Server,
GFT branches to
the end of the category processing:
Generated result for GDI
In
a generated Program,
GDI branches to the top of the
iteration loop (
F05) :
GO TO F05.
In a generated Screen (standard or client Screen),
GDI branches
to the next occurrence of the current category, or to the next category.
- In a function < F39, GDI produces:
GO TO F39999-ITER-FI.
- In a function > F39, GDI produces:
GO TO F69999-ITER-FI.
In a generated Server,
GDI branches to
the next occurrence of the current category, or to the next category.