Modules (programs), whether stored as load modules or program
objects, must be loaded into both virtual storage and central storage
before they can be run. When one module calls another module, either
directly by asking for it to be run or indirectly by requesting a
system service that uses it, it does not begin to run instantly. How
long it takes before a requested module begins to run depends on where
in its search order the system finds a usable copy and on how long
it takes the system to make the copy it finds available.
When a program is requested through a system service (like LINK,
LOAD, XCTL, or ATTACH) using default options, the system searches
for it in the following sequence:
- Job pack area (JPA)
A program in JPA has already been loaded
in the requesting address space. If the copy in JPA can be used, it
will be used. Otherwise, the system either searches for a new copy
or defers the request until the copy in JPA becomes available. (For
example, the system defers a request until a previous caller is finished
before reusing a serially-reusable module that is already in JPA.)
- TASKLIB
A program can allocate one or more data sets to a TASKLIB
concatenation. Modules loaded by unauthorized tasks that are found
in TASKLIB must be brought into private area virtual storage before
they can run. Modules that have previously been loaded in common area
virtual storage (LPA modules or those loaded by an authorized program
into CSA) must be loaded into common area virtual storage before they
can run.
- STEPLIB or JOBLIB
These are specific DD names that can be used
to allocate data sets to be searched ahead of the default system search
order for programs. Data sets can be allocated to both the STEPLIB
and JOBLIB concatenations in JCL or by a program using dynamic allocation.
However, only one or the other will be searched for modules. If both
STEPLIB and JOBLIB are allocated for a particular jobstep, the system
searches STEPLIB and ignores JOBLIB.
Any data sets concatenated
to STEPLIB or JOBLIB will be searched after any TASKLIB but before
LPA. Modules found in STEPLIB or JOBLIB must be brought into private
area virtual storage before they can run. Modules that have previously
been loaded in common area virtual storage (LPA modules or those loaded
by an authorized program into CSA) must be loaded into common area
virtual storage before they can run.
- LPA, which is searched in this order:
- Dynamic LPA modules, as specified in PROGxx members
- Fixed LPA (FLPA) modules, as specified in IEAFIXxx members
- Modified LPA (MLPA) modules, as specified in IEALPAxx members
- Pageable LPA (PLPA) modules, loaded from libraries specified in
LPALSTxx or PROGxx
LPA modules are loaded in common storage, shared by all address
spaces in the system. Because these modules are reentrant and are
not self-modifying, each can be used by any number of tasks in any
number of address spaces at the same time. Modules found in LPA do
not need to be brought into virtual storage, because they are already
in virtual storage.
- Libraries in the linklist, as specified in PROGxx and LNKLSTxx
By
default, the linklist begins with SYS1.LINKLIB, SYS1.MIGLIB, and SYS1.CSSLIB.
However, you can change this order using SYSLIB in PROGxx and add
other libraries to the linklist concatenation. The system must bring
modules found in the linklist into private area virtual storage before
the programs can run.
The default search order can be changed by specifying certain options
on the macros used to call programs. The parameters that affect the
search order the system will use are EP, EPLOC, DE, DCB, and TASKLIB.
Some IBM® subsystems (notably CICS®, DB2®,
and IMS™) and applications (such
as ISPF) use these facilities to establish other search orders for
programs.