Linkage Editor

The linkage editor prepares programs for execution and accepts as input the relocatable object modules produced by the language translators and object modules produced by the librarian PUNCH command.

It processes these modules into program phases, which can be executed immediately or cataloged into a library.

If object modules from a sublibrary are to be link-edited, the sublibrary must be defined with the statement:
// LIBDEF OBJ,SEARCH=lib.sublib
The sublibrary into which phases are to be cataloged must be defined with the statement:
// LIBDEF PHASE,CATALOG=lib.sublib
If the correct search chain and catalog sublibrary definitions have been made permanent for the partition, you need not include them in the linkage editor job.
Now you can define the linkage editor input and then call the linkage editor program with the following job control statement:
Read syntax diagramSkip visual syntax diagram // EXEC LNKEDT ,PARM=',MSHPAMODE=24AMODE=31AMODE=ANYRMODE=24RMODE=ANY'

If the present run of the linkage editor will replace an existing phase that is under control of the Maintain System History Program (MSHP), the EXEC statement must contain the parameter MSHP.

The AMODE/RMODE values specify the addressing mode and residence mode for all phases linked in the link-edit job. AMODE determines the addressing mode for the phase entry points and RMODE determines where the phases can reside in virtual storage.

The AMODE/RMODE parameters override the mode information derived from the ESD data for the control section. Note that if a MODE statement is specified for a phase, this specification is decisive, overriding ESD and PARM field definitions for this phase.

If the AMODE or RMODE parameter occurs more than once in the PARM field, the last valid parameter is used.

If only one value, either AMODE or RMODE, is specified in the PARM field, the other value is implied according to the following table:
Table 1. PARM Field - AMODE/RMODE Values
Specified Value Implied Value
AMODE=24 RMODE=24
AMODE=31 RMODE=24
AMODE=ANY RMODE=24
RMODE=24 see below
RMODE=ANY AMODE=31
If only RMODE=24 is specified in the PARM field, no overriding AMODE is implied; instead, the AMODE value in the ESD data for the entry point is used.
The following combinations of AMODE and RMODE are possible in the PARM field of the EXEC statement:
Table 2. PARM Field - AMODE/RMODE combinations
  RMODE=24 RMODE=ANY
AMODE=24 Valid Invalid
AMODE=31 Valid Valid
AMODE=ANY Valid Invalid
If the AMODE/RMODE combination is invalid, the linkage editor issues a warning message on SYSLST and ignores the AMODE/RMODE parameters.

The actual AMODE/RMODE of a phase is shown in the linkage editor map. An example is shown in Diagnosing.