The linkageKey statement
property explicitly
assigns an element in a linkage options part. The element identifies
specifics
on how to implement a call or transfer. The value you assign is a
quoted string.
For example, to identify a
callLink element
for
a
call statement, you can write something
like the
following example:
call nextProgram (myVar) { linkageKey="CICS3" };
CICS3 is a label you assign to a callLink element
in the linkage options part for the calling program. nextProgram is
a STRING variable containing a program name to be determined at run
time.
You only need the
linkageKey property
if both
the following situations are in effect:
- EGL cannot resolve
the name of the program to which you are transferring
control at generation time. This can be caused by either of two things:
- You specified the runtime name of the program in quotation marks
and the
runtime name is not the same as the program part name. This might
be because
the called program has an alias, or because the part name is truncated
because
the runtime environment does not support long names.
- You specified
the program name in a variable, meaning the value is not
known until run time. In the earlier example, the program name is
contained
in the variable nextProgram.
- You
do not want to use the default call or transfer implementation (based
on type of call or transfer and on target environment).
You
can use the linkageKey property to specify
a set of linkage options and use them for multiple programs. You can
give
the options a generic name, like CICS3, rather than
creating
duplicate entries for each program name or using a wildcard for the
program
name in the callLink element. CICS3 might
refer to a callLink element for a CICS3
system.
For more information, see Using linkage options parts in a call or transfer.