When you are generating a COBOL program for z/OS®, the linkEdit build
descriptor option identifies a link edit part. That part provides
a way to create the information for a link edit file, which in turn
specifies how to combine COBOL programs into a load module.
At generation time, EGL reviews the
linkEdit option
with these possible results:
- If the linkEdit option has a value specified,
EGL searches for a link edit part whose name matches that value. The
results of that search determine the effects, as follows:
- If the link edit part is found, the contents of that part are
copied to a link edit file, with the file extension LKG. If there
are symbolic parameters in the link edit file, EGL replaces them with
their respective values.
- If the link edit part is not found, a generation error occurs.
- If the linkEdit option does not have
a value specified, EGL searches for a link edit part whose name matches
the program being generated. The results of that search determine
the effects, as follows:
- If EGL finds a link edit part, the contents of that part are copied
to a link edit file with the file extension LKG. If there are symbolic
parameters in the link edit file, EGL replaces them with their respective
values.
- If EGL does not find a link edit part, EGL does not create a link
edit part with the extension LKG.
In all cases, EGL generates a link edit file with the file extension
LED. This provides the link edit information for the program, including
all EGL runtime modules that must be statically linked. When there
is a link edit part and a resulting LKG link edit file, the build
plan specifies that the build scripts should include an extra step
in the preparation process, to relink the program using the link edit
commands from the LKG file. You can then statically link the program
with other EGL or non-EGL programs.
You can use your own symbolic parameters in the link edit part,
as well as those listed in the topic "Predefined symbolic parameters
for EGL generation."