Modernization Hub

FW - Fullword

Enhanced Definition

A **Fullword** (FW) is a fundamental fixed-length data unit in IBM mainframe architecture, occupying 4 bytes (32 bits) of contiguous storage. It is primarily used to store signed binary integer values or memory addresses, and it requires alignment on a storage address that is a multiple of four.

Key Characteristics

    • Size: Consists of 4 bytes (32 bits) of contiguous storage.
    • Alignment: Must be aligned on a fullword boundary, meaning its starting memory address must be a multiple of 4. Misalignment can lead to 0C6 (specification exception) program checks or performance degradation.
    • Data Representation: Typically stores signed binary integers using two's complement notation, allowing values from -2,147,483,648 to +2,147,483,647. The leftmost bit serves as the sign bit.
    • Address Storage: Frequently used to store 31-bit memory addresses (in 31-bit addressing mode) or 24-bit addresses (in 24-bit addressing mode), with the high-order bit often used as an AMODE indicator in 31-bit mode.
    • Assembler Directives: Defined in assembler language using the DC F (Define Constant Fullword) or DS F (Define Storage Fullword) directives.

Use Cases

    • Integer Variables: Storing integer values in programs, such as loop counters, array indices, or numeric flags, especially when the required range exceeds that of a Halfword.
    • Address Pointers: Holding memory addresses, such as base register values, entry point addresses of subroutines, or pointers to data structures within assembler and system programming.
    • System Parameters: Passing parameters to system services or other programs, where a 4-byte integer or address is expected, often in a parameter list.
    • COBOL COMP-5: In COBOL, PIC S9(n) BINARY or COMP-5 items with n between 5 and 9 digits are typically implemented as fullwords, providing efficient binary arithmetic.

Related Concepts

A Fullword is one of several standard fixed-length data types in z/OS, alongside the Byte (1 byte), Halfword (2 bytes), and Doubleword (8 bytes). Its alignment requirement is fundamental to z/OS storage management and instruction execution, as many machine instructions (e.g., L for Load, ST for Store, A for Add) implicitly assume or require fullword alignment for operands. It is closely tied to assembler language programming, where it's explicitly defined and manipulated, and to the architecture's general purpose registers (GPRs), which are 32 bits wide and often hold fullword values or addresses.

Best Practices:
  • Ensure Alignment: Always define fullwords on proper boundaries using DS F or DC F in assembler, or ensure compiler-generated storage aligns correctly for COMP-5 items in COBOL. Misalignment can cause 0C6 program checks or performance degradation.
  • Choose Appropriate Size: Use a fullword only when the required integer range or address size necessitates it. For smaller integer values, a `Halfword

Related Vendors

IBM

646 products

Trax Softworks

3 products

Related Categories