Understanding IGZ0033S: Passing Parameters Above 16 MB to AMODE(24) COBOL Programs
If you’re working with IBM Enterprise COBOL on z/OS, you may encounter the error:
IGZ0033S: An attempt was made to pass a parameter address above 16 megabytes to AMODE(24) program PXXXX
This can be confusing, especially when modern programs and legacy code interact. In this post, we’ll break down the root cause, explain AMODE vs DATA, and provide practical solutions.
What Causes IGZ0033S?
Most modern COBOL applications are compiled with AMODE(31), allowing them to access memory above the 16 MB line. However, many legacy or vendor-supplied programs still run in AMODE(24), which is limited to 16 MB of addressable memory.
The problem arises when an AMODE(31) program calls an AMODE(24) program and passes a parameter that resides above the 16 MB memory line.
Let’s take the Scenario:
- Caller Program: PPXXX (entry
DLITCBL)- ✅ Compiled as AMODE(31)
- ✅ Running correctly
- ❌ Calls an AMODE(24) subprogram
When the caller passes a pointer located above 16 MB to the legacy subprogram, the system triggers IGZ0033S.
What exactly is the 16‑MB line?
It is the boundary between 24‑bit and 31‑bit addressing.
Why 16 MB?
- 24 bits, AMODE (24) can represent:
2^24 = 16,777,216 bytes = 16 MB - Any address that requires more than 24 bits is above this line.
- Thus 16‑MB line is simply the largest address that fits in 24 bits: 2²⁴ bytes.
Key Rule: Never pass a parameter above 16 MB to an AMODE(24) program.
Understanding AMODE vs DATA in z/OS
To fix this issue, it’s important to understand the difference between AMODE and DATA:
| Setting | Purpose | Effect |
|---|---|---|
| AMODE | Addressing mode | Determines how much memory the program can access |
| DATA | Data placement | Determines where the program’s data resides in memory |
Important Distinction:
- AMODE(31) lets a program see memory above 16 MB.
- DATA(31) allows the program’s data to be placed above 16 MB.
- Passing a DATA(31) pointer to an AMODE(24) program causes IGZ0033S.
z/OS VIRTUAL STORAGE ADDRESS SPACE
==================================
31-bit Addressable Space (AMODE(31)) ~2 GB Total
─────────────────────────────────────────────────────
7FFFFFFF ───────────────────────────────────────────
| |
| ABOVE THE 16‑MB LINE |
| (31‑bit addresses) |
| |
| WHAT LIVES HERE |
| • AMODE(31) programs |
| • DATA(31) WORKING‑STORAGE |
| • LE User / Anywhere Heaps |
| • DB2 & IMS buffers |
| • Large arrays & modern workloads |
| |
| WHO CAN ACCESS THIS? |
| ✅ AMODE(31) programs |
| ❌ AMODE(24) programs (BLIND) |
| |
01000000 ────────────── 16‑MB LINE ────────────────
| |
| BELOW THE 16‑MB LINE |
| (24‑bit addresses: 00xxxxxx) |
| |
| WHY THIS EXISTS |
| • Original 24‑bit architecture |
| • Backward compatibility |
| |
| WHAT LIVES HERE |
| • AMODE(24) programs |
| • DATA(24) WORKING‑STORAGE |
| • System control blocks |
| • Legacy exits & interfaces |
| • CEEGTST BELOW heap buffers |
| |
| WHO CAN ACCESS THIS? |
| ✅ AMODE(24) programs |
| ✅ AMODE(31) programs |
| |
00000000 ───────────────────────────────────────────
KEY RULES (MEMORIZE THESE)
=========================
1) AMODE defines how FAR code can address
- AMODE(24): 0 → 16 MB only
- AMODE(31): 0 → ~2 GB
2) DATA defines WHERE data is placed
- DATA(24): below the line
- DATA(31): anywhere (usually above the line)
3) ABSOLUTE SAFETY RULE
❗ Never pass an address ABOVE 16 MB
to an AMODE(24) program
4) CORRECT MODERN PATTERN
- Main program: AMODE(31), DATA(31)
- Legacy call : Copy parameters
↓
BELOW‑THE‑LINE buffer
↓
CALL AMODE(24) program
IF YOU VIOLATE RULE #3:
======================
IGZ0033S
“Attempt was made to pass a parameter
address above 16 MB to an AMODE(24) program”
Mental Model:
AMODE defines what the program can see;
DATA defines where the data lives.
Always respect the 16 MB boundary for AMODE(24) programs.
How to Fix IGZ0033S
There are two practical solutions:
1. Use Bridging
- Use CEEGTST or local DATA(24) buffers to copy parameters below the 16 MB line.
- Pass these “safe” buffers to the AMODE(24) program.
2. Recompile the Called Pgm
- If possible, recompile the called program as AMODE(31).
- Ensure DATA(31) for consistency with the caller.
- This approach removes the 16 MB restriction entirely.
Key Takeaways
- AMODE(24) programs cannot access memory above 16 MB.
- AMODE(31) programs + DATA(31) can access memory above 16 MB, but cannot pass those addresses to AMODE(24) programs.
- Use bridging or recompile the callee to avoid IGZ0033S.
Following these guidelines ensures smooth interoperability between modern COBOL programs and legacy AMODE(24) modules.
Leave a comment