Modernization Hub

Doubleword

Enhanced Definition

A doubleword is a fundamental unit of data storage and processing in IBM mainframe systems, consisting of eight bytes (64 bits). It is primarily used to represent large integer values, double-precision floating-point numbers, and 64-bit memory addresses within the z/OS environment. A doubleword is a unit of data comprising eight bytes (64 bits) in IBM mainframe architecture, including z/Architecture. It is a fundamental storage and processing unit, primarily used for storing 64-bit addresses, large integer values, and double-precision floating-point numbers, often requiring alignment on an eight-byte boundary for optimal performance.

Key Characteristics

    • Size: Comprises 8 bytes, which equates to 64 bits of data.
    • Alignment: For optimal performance and to avoid program checks (e.g., 0C4 abend), doublewords typically require alignment on an 8-byte boundary in memory.
    • Data Representation: Can store signed or unsigned 64-bit integers, or double-precision floating-point numbers as defined by the IEEE 754 standard.
    • Processor Support: Directly supported by z/Architecture processors, which feature 64-bit General Purpose Registers (GPRs) capable of holding and manipulating doubleword values.
    • Addressing: Essential for 64-bit virtual storage addressing, where memory addresses themselves are 64 bits long.

Use Cases

    • 64-bit Addressing: Storing and manipulating 64-bit memory addresses (pointers) in z/OS applications operating in 64-bit addressing mode.
    • Large Integer Arithmetic: Performing calculations with integer values that exceed the capacity of a fullword (32 bits), such as large counters or financial calculations.
    • Double-Precision Floating-Point: Representing high-precision real numbers in scientific, engineering, or financial applications where accuracy is critical.
    • System Control Blocks: Used within z/OS system control blocks and data structures to store 64-bit fields, such as timestamps, large offsets, or status flags.

Related Concepts

A doubleword is part of a hierarchy of data sizes on the mainframe, building upon the fundamental byte (8 bits). It is twice the size of a fullword (4 bytes/32 bits) and four times the size of a halfword (2 bytes/16 bits). The introduction of doubleword support and 64-bit GPRs was a key feature of the z/Architecture, enabling z/OS to move beyond 31-bit addressing limitations and manage much larger virtual storage. It is often manipulated by specific machine instructions designed for 64-bit operations.

Best Practices:
  • Proper Alignment: Always ensure that doubleword data items are aligned on an 8-byte boundary in COBOL PIC S9(18) COMP-5 or assembler DS 0D definitions to prevent performance degradation or 0C4 program checks.
  • Appropriate Data Type Selection: Use doubleword only when the data truly requires 64 bits of storage (e.g., large integers, 64-bit addresses, double-precision floats) to avoid wasting memory and improve cache efficiency.
  • Leverage 64-bit Instructions: When performing operations on doubleword values, utilize the z/Architecture's 64-bit instructions (e.g., LD, STD, AGR, SGR) for optimal performance.
  • Interoperability: Be mindful of doubleword usage when exchanging data with older 31-bit or 24-bit applications, as explicit conversion or mapping might be necessary.

Related Vendors

IBM

646 products

Trax Softworks

3 products

Related Categories

Performance

171 products

Operating System

154 products

Browse and Edit

64 products