For programs generated for the iSeriesC environment, you
can improve performance by changing the linkType to
STATIC.
The
linkType property of the
callLink element
of the linkage options part is set to DYNAMIC by default for targets
of a
call statement in the iSeriesC environment.
The COBOL statement that EGL produces to carry out the call is a CALL
identifier statement.
This is the opposite of a CALL
literal statement,
which is associated with a STATIC program linkage type in EGL. For
the best runtime performance on a
call statement,
use the STATIC value for the
linkType property
when generating COBOL. The STATIC link type has the following advantages:
- The call statement resolves to the target
program object and sets a system pointer.
- The system continues to use that system pointer for the duration
of the COBOL run unit.
The EGL DYNAMIC program linkage type is implemented so that for
each
call statement, COBOL resolves the
call statement
to the target program object. To eliminate the need to constantly
resolve called programs, use the STATIC link type. To change the
default at generation time, do both of the following things:
- Define a linkage options part that specifies the callLink element
and sets the linkType property for the
program to STATIC.
- In your Build Descriptor part, set the linkage build
descriptor option to point to your linkage options part.
The following example shows a
callLink element
in a linkage options part that affects all
call statements
in all generated programs by effectively changing the default
linkType from
DYNAMIC to STATIC:
<callLink>
<localCall pgmName="*" linkType="STATIC"/>
</callLink>
For more information on creating and using linkage options parts,
see Overview of linkage options part.