Linkage editor and binder support of AMODE and RMODE

The linkage editor accepts AMODE and RMODE specifications from any or all of the following:
Linkage editor processing results in two sets of AMODE and RMODE indicators located in:
These two sets of indicators might differ because they can be created from different input. The linkage editor creates indicators in the load module based on input from the input object module and load module. The linkage editor creates indicators in the PDS directory based not only on input from the object module and load module but also on the PARM field of the linkage editor EXEC statement, and the MODE control statements in the SYSLIN data set. The last two sources of input override indicators from the object module and load module. Figure 1 shows linkage editor processing of AMODE and RMODE.
Figure 1. AMODE and RMODE Processing by the Linkage Editor
ieaa6ple
The linkage editor and binder use default values of AMODE 24/RMODE 24 for:

Treat programs in overlay structure as AMODE 24, RMODE 24 programs. Putting a program into overlay structure destroys any AMODE and RMODE specifications contained in the load module.

The linkage editor recognizes as valid the following combinations of AMODE and RMODE:
AMODE 24
RMODE 24
AMODE 31
RMODE 24
AMODE 31
RMODE ANY
AMODE ANY
RMODE 24
AMODE ANY
RMODE ANY

The linkage editor accepts the ANY/ANY combination from the object module or load module and places AMODE 31, RMODE ANY into the PDS (unless overridden by PARM values or MODE control statements). The linkage editor does not accept ANY/ANY from the PARM value or MODE control statement.

Any AMODE value specified alone in the PARM field or MODE control statement implies an RMODE of 24. Likewise, an RMODE of ANY specified alone implies an AMODE of 31. However, for RMODE 24 specified alone, the linkage editor does not assume an AMODE value. Instead, it uses the AMODE value specified in the CSECT in generating the entry or entries in the PDS.

When the linkage editor creates an overlay structure, it assigns AMODE 24, RMODE 24 to the resulting program.