# S878: Not enough virtual storage

Source: https://wndsoftware.com/mainframe-errors/s878

An S878 abend means a program asked z/OS for virtual storage, through a GETMAIN or STORAGE OBTAIN request, and there wasn't enough. S878-10, the form most people meet, means the job's own region ran out.


### Other names for this code

Also written as `878`, `S878-10`, `878-10`, `abend 878`, `system abend 878`, `ABEND=S878`, `S878-04`.


## What it means

Programs, and the runtime libraries under them such as Language Environment, get working storage from z/OS while they run. S878 comes from the register forms of GETMAIN and from STORAGE OBTAIN, which most current code uses. When the request can't be met, the system issues message `IEA705I` and ends the task.

S878 shares its meaning with [S80A](https://wndsoftware.com/mainframe-errors/s80a) and [S804](https://wndsoftware.com/mainframe-errors/s804). Only the form of the request differs. The reason code is what tells you where to look, because it names the storage area that ran short.

On a small screen, swipe the table to read all columns.


| Reason | Storage that ran short | What it usually means | Who fixes it |
| --- | --- | --- | --- |
| `10` | Private area of your address space (the region) | The program needs more than REGION allows, or it keeps getting storage and never frees it | You, with a bigger REGION or a code fix |
| `0C` | LSQA, the system's own storage inside your address space | Too many tasks or system control blocks for the space left | Your system programmer |
| `04` | SQA, shared by the whole system | A system-wide shortage. Other jobs are probably failing too | Operations and system programmers |
| `08` | CSA, shared by the whole system | A system-wide shortage, often from one address space using too much common storage | Operations and system programmers |

The private area is what REGION controls. It has two parts, below and above the 16 MB line. Below the line the space is small, well under 16 MB, and shared with system control blocks. Programs that need storage there run out first, however large a REGION you code.


## Common causes

- Reason 10, REGION too small for the program, often after it grew or after the input grew.
- Reason 10, a storage leak. The program, or a routine it calls, gets storage again and again and never frees it.
- Reason 10, below-the-line storage used up. COBOL compiled with DATA(24), AMODE 24 code, or many files with large buffers can fill the area below 16 MB.
- Reason 04 or 08, a shortage of common storage across the whole system, often caused by a different address space.
- 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 `IEA705I` and read the code and reason, for example `878-10`, and the size of the request. A request far bigger than anything the program should need suggests a bad length value.
- Read the step end message `IEF032I`. VIRT and EXT show the most user storage used below and above the 16 MB line. Compare them with the REGION you coded to see which side ran out.
- Check REGION on the EXEC and JOB statements. A REGION on the JOB statement overrides the EXEC value for every step.
- For a Language Environment program, rerun with the runtime option `RPTSTG(ON)`. The report shows heap and stack use and suggests better settings.
- For reason 04 or 08, check whether other work failed at the same time, and tell operations.


## How to fix it

- For reason 10, raise REGION on the EXEC statement, for example `REGION=128M`, or use `REGION=0M` if your site allows it.
- Move storage above the line. Compile COBOL with DATA(31), link AMODE 31, and set the Language Environment options `ALL31(ON)` and HEAP and STACK with ANYWHERE.
- Fix any leak. Raising REGION for a leaking program only moves the failure later.
- For reasons 04, 08 and 0C, or when the storage you get is less than you coded, take the IEA705I message and the time to your system programmers.


## What it looks like


```text
IEA705I ERROR DURING GETMAIN SYS CODE = 878-10  CLMLOAD1 STEP020
IEF450I CLMLOAD1 STEP020 - ABEND=S878 U0000 REASON=00000010
IEF032I STEP/STEP020 /STOP 2026285.0233
        CPU:     0 HR  00 MIN  12.40 SEC    SRB:     0 HR  00 MIN  00.09 SEC
        VIRT:  8996K  SYS:   296K  EXT:   32764K  SYS:    11736K
```


## IBM documentation

[IBM z/OS: 878](https://www.ibm.com/docs/en/zos/3.1.0?topic=codes-878). Use the documentation for your installed release.

[Report a correction to WND Software](https://wndsoftware.com/contact#message).

Technical reviewer: [Albert Joseph](https://wndsoftware.com/authors/albert-joseph), WND Software.

Last reviewed 2026-10-12 by the WND Software team. Written in our own words. For the full reference, check IBM’s z/OS documentation for your release.


## Related codes

[S80A Not enough virtual storage (R-form GETMAIN) Read →](https://wndsoftware.com/mainframe-errors/s80a)
[S804 Not enough virtual storage (GETMAIN) Read →](https://wndsoftware.com/mainframe-errors/s804)
[U4038 Language Environment severe error Read →](https://wndsoftware.com/mainframe-errors/u4038)
[S0C4 Protection exception Read →](https://wndsoftware.com/mainframe-errors/s0c4)
[ASRA Program check in a CICS transaction Read →](https://wndsoftware.com/mainframe-errors/asra)

## Questions


### What does S878-10 mean?

Reason code 10 means the private area of the address space, the storage REGION controls, had no room for the request.


### What does S878-04 mean?

Reason code 04 means the system queue area (SQA), which every address space shares, ran short. It's a system-wide problem, so tell operations rather than changing your JCL.


### Will REGION=0M always prevent S878?

No. It gives the step all the private storage your site allows, but a leak can still use it up, and reasons 04 and 08 have nothing to do with your region.

[z/OS system abends](https://wndsoftware.com/mainframe-errors/zos-abends) · [S837](https://wndsoftware.com/mainframe-errors/s837) · [S913](https://wndsoftware.com/mainframe-errors/s913)

[← All error codes](https://wndsoftware.com/mainframe-errors/)
