Fetching modules with different AMODEs

Language Environment supports the PL/I FETCH/RELEASE facility. No special considerations apply to this support when both the fetching executable program and the fetched executable programs have the AMODE(ANY) attribute or both have the AMODE(24) attribute.

Language Environment also supports the fetching of a load module that has a different AMODE attribute than the executable program issuing the FETCH statement. Language Environment performs the AMODE switches in this case, and the following constraints apply:

When a PL/I routine fetches another PL/I procedure, it is possible for a condition to arise in the fetched procedure for which a PL/I ON-unit was established in the fetching procedure.

PL/I imposes the restriction that if an ON-unit is established while the current addressing mode is 24-bit, and the condition is raised while the addressing mode is 31-bit, the ON-unit is not invoked. This is because PL/I must invoke the ON-unit in the addressing mode in which it was established. If the ON-unit was established in 24-bit addressing mode but the condition arose in 31-bit addressing mode, the code and data required to process the error might not even be addressable in 24-bit addressing mode.