What it means
Programs get their working storage from z/OS while they run. They ask with a GETMAIN or STORAGE request, and the system takes the space from the private area of the job's address space, up to the limit set by REGION. If there isn't room, and the program didn't say it could manage without the storage, the system ends the step.
Which code you get depends on the form of the request, not on what went wrong. S804 comes from the EU, LU and VU forms of GETMAIN. S80A comes from the R form, and S878 from the newer register forms and STORAGE OBTAIN. In practice the three mean the same thing and have the same fixes.
Message IEA705I appears with the code and a reason, such as 804-10. The reason names the storage area that ran short. Reason 10 is the one most jobs hit. It means the private area of your address space had no room left, and that is the area REGION controls.
Common causes
- REGION is too small for the program, often after the program grew with bigger tables, new copybooks or more files open.
- The program builds a table in storage whose size depends on the input, and today's input was bigger.
- A storage leak. The program gets storage again and again, for example inside a loop, and never frees it.
- The program or its data has to live below the 16 MB line, for example an AMODE 24 program or a COBOL program compiled with DATA(24). That area is small and runs out even when there is plenty of storage above the line.
- Your site's IEFUSI exit or SMFLIMxx parmlib member gave the step less storage than the REGION you coded.
How to find the problem
- Find
IEA705Iin the job log. Note the reason code and the size of the request. A huge request, such as hundreds of megabytes, points to a bad length value from a program bug rather than a real need. - Check REGION on the EXEC statement and on the JOB statement. REGION on the JOB statement overrides the EXEC value for every step.
- Read the step end message
IEF032I. VIRT and EXT show the most user storage the step used below and above the 16 MB line. If VIRT is close to the region below the line, that is the area that ran out. - For a Language Environment program, rerun with the runtime option
RPTSTG(ON)to get a report of its heap and stack use. - If the step fails at a different point each time with the same input, suspect a leak.
How to fix it
- Raise REGION on the EXEC statement, for example
REGION=64M, or on the JOB statement if your standards say so.REGION=0Masks for all the storage your site allows. - Move storage above the line. Compile COBOL with DATA(31), link the program AMODE 31, and use the Language Environment options
ALL31(ON)and HEAP and STACK with ANYWHERE. - Fix any leak so the program frees what it gets.
- If the storage you get is less than you asked for, ask your system programmer about the IEFUSI exit or SMFLIMxx limits.
What it looks like
IEA705I ERROR DURING GETMAIN SYS CODE = 804-10 INVLOAD1 STEP010
IEF450I INVLOAD1 STEP010 - ABEND=S804 U0000 REASON=00000010
IEF032I STEP/STEP010 /STOP 2026285.0912
CPU: 0 HR 00 MIN 01.07 SEC SRB: 0 HR 00 MIN 00.02 SEC
VIRT: 8180K SYS: 312K EXT: 0K SYS: 10840K