Modernization Hub

Dual Mode

Enhanced Definition

In the context of IBM z/OS, "Dual Mode" most commonly refers to the capability of a program or system component to operate in two distinct **addressing modes** during execution, primarily switching between 24-bit and 31-bit addressing. This allows programs to access memory locations either below or above the 16MB line, respectively, balancing compatibility with older code and access to extended virtual storage. Another interpretation refers to the CPU's ability to operate in Problem State or Supervisor State. In the context of IBM z/OS mainframes, "Dual Mode" primarily refers to the capability of the operating system and applications to operate using different **addressing modes**, specifically 24-bit and 31-bit addressing. This allows programs to access memory locations within different address ranges, significantly impacting how much virtual storage they can utilize.

Key Characteristics

    • Addressing Mode Switching: Programs can dynamically switch their addressing mode between AMODE(24) (addressing up to 16MB) and AMODE(31) (addressing up to 2GB) using specific machine instructions or system services.
    • Memory Access Impact: The active addressing mode dictates the maximum virtual storage address that a program can directly reference. AMODE(24) restricts access to the first 16MB of virtual storage, while AMODE(31) allows access to addresses above 16MB.
    • Linkage Conventions: Switching addressing modes requires adherence to specific z/OS linkage conventions, often involving the BASR (Branch and Save Register) and BASSM (Branch and Save and Set Mode) instructions, or system macros like CALL and LINK.
    • Residency Mode (RMODE): Closely related to AMODE, RMODE specifies where a program module can reside in virtual storage (RMODE(24) for below 16MB, RMODE(ANY) for anywhere). A program's AMODE must be compatible with the RMODE of the modules it calls.
    • CPU Operating States: At a lower level, the CPU operates in "dual modes" of Problem State (for user applications) and Supervisor State (for the operating system kernel and privileged operations), controlled by the Program Status Word (PSW).

Use Cases

    • Interfacing Legacy and Modern Code: Allows older AMODE(24) COBOL or Assembler modules to seamlessly call or be called by newer AMODE(31) modules, facilitating phased modernization efforts.
    • Accessing Extended Virtual Storage: Enables programs to store and process large data structures or buffers in virtual storage above the 16MB line (AMODE(31)), overcoming the memory constraints of AMODE(24) without rewriting the entire application.
    • System Service Calls: Many z/OS system services (e.g., SVCs, PC routines) inherently involve AMODE switching to perform privileged operations in Supervisor State or to manage resources across different memory regions.
    • Optimizing Resource Usage: Reentrant code that can reside above 16MB (RMODE(ANY)) can be executed by multiple users, improving virtual storage utilization, especially in environments like CICS.

Related Concepts

Dual Mode, particularly regarding addressing, is fundamental to Virtual Storage management on z/OS. It is directly controlled by the Program Status Word (PSW), which contains the addressing mode bit. The Linkage Editor plays a crucial role by setting the initial AMODE and RMODE for load modules based on source code directives or parameters. It impacts how programs interact with Data Spaces and Hiperspaces, which are always addressed in 31-bit mode. Understanding dual mode is essential for developing and debugging programs that use System Services (SVCs, PCs) and interact with subsystems like CICS, DB2, and IMS,

###

Related Vendors

IBM

646 products

ADPAC Corporation

5 products

Tone Software

14 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Tools and Utilities

519 products

Automation

222 products

Browse and Edit

64 products