Bringing the load module into virtual storage

The control program automatically brings the load module containing the entry name you specified on the EXEC statement into virtual storage. Each load module or program object resides in a library, either a partitioned data set (PDS) or partitioned data set extended (PDSE). A load module resides in a PDS, and a program object resides in a PDSE. In most cases, references to load modules apply to both load modules and program objects. Any exceptions are specifically noted. As the control program brings the load module into virtual storage, it places the load module above or below 16 megabytes according to its RMODE attribute. Any other load modules you require during your job step are brought into virtual storage by the control program when requested. Make these requests by using the LOAD, LINK, LINKX, ATTACH, ATTACHX, XCTL, and XCTLX macros. The LOAD macro sets the high-order bit of the entry point address to indicate the addressing mode of the load module. The ATTACH, ATTACHX, LINK, LINKX, XCTL, and XCTLX macros use this information to set the addressing mode for the module that gets control. If the AMODE is ANY, the module will get control in the same addressing mode as the program that issued the ATTACH, ATTACHX, LINK, LINKX, XCTL, or XCTLX macro. If a copy of the load module must be brought into storage, the control program places the load module above or below 16 megabytes according to its RMODE attribute. The following paragraphs discuss the proper use of these macros.