The linkageKey statement property references
an element in a linkage options part. The element indicates how to
implement a call or transfer in the EGL-generated code.
Here is an example
call statement that
includes the
linkageKey property:
call nextProgram (myVar) { linkageKey="CICS3" };
In relation to a call, the assigned value refers to the pgm attribute
in a callLink element. In relation to a
transfer, the assigned value refers to the toPgm attribute
in a transferToProgram or transferToTransaction element.
The default value of the
linkageKey property
is the name of the invoked program, but only if you specify the program
name directly in the coded statement, as in the following example:
call "PROG3" (myVar);
You need the
linkageKey property only
if the following cases are both in effect:
- The default values for the call or transfer implementation are
not appropriate; and
- EGL cannot identify which linkage part element applies to the
call or transfer, as might be the case for either of two reasons:
- You specified the runtime name of the program in quotation marks
and the runtime name is not the same as the program part name. The
difference might be because the called program has an alias or because
the part name is truncated for a runtime environment that does not
support long names.
- Alternatively, you specified the program name in a variable, in
which case the value is not known until run time. In the first example
in this topic, the program name is in the variable nextProgram.
When coding multiple
call or
transfer statements,
you can refer to the same linkage part element in the following ways:
- Specify the same value for the linkageKey properties;
for example, use “CICS3” in several calls.
- Alternatively, specify different but related values for the linkageKey properties.
In this case, the different values (for example, “CICS3” and “CICS30”)
refer to a single attribute that includes a wild-card character, as
in the following example of a pgm attribute
in a callLink element:
pgm="CICS3*"
For details on wild cards in attribute values, see “Overview of
the linkage options part.”