This section describes the effect of the MVS™ residence and addressing modes on application programs, how you can change the modes, and how you can make application programs permanently resident. An application written to run on MVS/370 can run on any MVS system, if it is link-edited with the AMODE(24) and RMODE(24) options.
A command-level program can reside above 16MB, and address areas above 16MB. The program can contain EXEC CICS®, EXEC DLI, and CALL DL/I commands.
Every program that executes in MVS is assigned two attributes: an addressing mode (AMODE), and a residency mode (RMODE). AMODE specifies the addressing mode in which your program is designed to receive control. Generally, your program is designed to execute in that mode, although you can switch modes in the program, and have different AMODE attributes for different entry points within a load module. The RMODE attribute indicates where in virtual storage your program can reside. Valid AMODE and RMODE specifications are:
AMODE(24) | Specifies 24-bit addressing mode. |
AMODE(31) | Specifies 31-bit addressing mode. |
AMODE(ANY) | Specifies either 24- or 31-bit addressing mode. |
RMODE(24) | Indicates that the module must reside in virtual storage below 16MB. You can specify RMODE(24) for 31-bit programs that have 24-bit dependencies. |
RMODE(ANY) | Indicates that the module can reside anywhere in virtual storage. |
If you do not specify any AMODE or RMODE attributes for your program, MVS assigns the system defaults AMODE(24) and RMODE(24). To override these defaults, you can specify AMODE and RMODE in one or more of the following places. Assignments in this list overwrite assignments later in the list.
MODE AMODE(31),RMODE(ANY)
//LKED EXEC PGM=IEWL,PARM='AMODE(31),RMODE(ANY),..'
Table 5 gives the valid combinations of the AMODE and RMODE attributes and their effects:
AMODE | RMODE | Residence | Addressing |
---|---|---|---|
24 | 24 | Below 16MB | 24-bit mode |
31 | 24 | Below 16MB | 31-bit mode |
ANY | 24 | Below 16MB | 31-bit mode |
31 | ANY | Above 16MB | 31-bit mode |
The following example shows link-edit control statements for a program coded to 31-bit standards:
//LKED.SYSIN DD *
MODE AMODE(31),RMODE(ANY)
NAME anyname(R) ("anyname" is your load module name)
/*
//
If you define a program in the CSD with the resident attribute, RESIDENT(YES), it is loaded on first reference. This applies to programs link-edited with either RMODE(ANY) or RMODE(24). However, be aware that the storage compression algorithm that CICS uses does not remove resident programs.
If there is not enough storage for a task to load a program, the task is suspended until enough storage becomes available. If any of the DSAs get close to being short on storage, CICS frees the storage occupied by programs that are not in use. (For more information about the dynamic storage areas in CICS, see the CICS System Definition Guide.)
Instead of making RMODE(24) programs resident, you can make them non-resident and use the library lookaside (LLA) function. The space occupied by such a program is freed when its usage count reaches zero, making more virtual storage available. LLA keeps its library directory in storage and stages (places) copies of LLA-managed library modules in a data space managed by the virtual lookaside facility (VLF). CICS locates a program module from LLA’s directory in storage, rather than searching program directories on DASD. When CICS requests a staged module, LLA gets it from storage without any I/O.
[[ Contents Previous Page | Next Page Index ]]