# SB37: Out of space

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

An SB37 abend means a data set being written needed more space, but it couldn't get another extent on its current volume and had no other volume to move to. Message IEC030I B37-04 names the data set and volume.


### Other names for this code

Also written as `B37`, `SB37-04`, `B37-04`, `abend B37`, `system abend B37`, `ABEND=SB37`, `x37 abend`, `out of space abend`.


## What it means

A disk data set gets its space in pieces called extents. The first piece is the primary amount from the SPACE parameter. When it fills, the system adds the secondary amount as a new extent, again and again as needed. There are limits. A basic sequential data set or a PDS can have at most 16 extents on one volume, and an extended format data set or a PDSE up to 123. A sequential data set that isn't large format also can't use more than 65,535 tracks on one volume.

SB37 means the data set needed another extent and couldn't get one. The volume had no free space left, the data set had reached one of those limits, or the VTOC had no room to record a new extent. The data set also had no further volume to move to, so the system ended the step with B37.

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


| Code | Message | What happened |
| --- | --- | --- |
| [SB37](https://wndsoftware.com/mainframe-errors/sb37) | `IEC030I` | The data set asked for another extent and couldn't get one on its volume, and it had no other volume to move to |
| [SD37](https://wndsoftware.com/mainframe-errors/sd37) | `IEC031I` | The primary space filled and no secondary space was ever requested, so the data set couldn't ask for more |
| [SE37](https://wndsoftware.com/mainframe-errors/se37) | `IEC032I` | The data set had already used every volume or extent it is allowed. A full PDS is the classic case |

Message `IEC030I` carries a reason code after the B37.

- `04` is the one you'll nearly always see, and it covers every case above.
- `08` is rare. The system had to convert the VTOC on the volume to find space, and the conversion failed. That is a job for your storage administrator.
- `0C` is rare too. It means too many data sets were already open on the device.


## Common causes

- The data grew. A month-end run writes far more than SPACE was sized for.
- SPACE was too small from the start, for example values copied from a test job.
- The secondary amount is small, so the data set uses up its 16 extents before it gets the space it needs. SPACE=(TRK,(5,5)) can never grow past 80 tracks on one volume.
- The volume was nearly full when the job ran, so there was no free space for the next extent.
- The job appends with DISP=MOD every run, and the data set has finally filled.


## How to find the problem

- Read `IEC030I`. It gives the reason code, the job, step and DD name, the volume serial and the data set name.
- Check the SPACE parameter on that DD against how much the step wrote. Compare the output record count with a normal run, and suspect a loop if it's far higher.
- In ISPF option 3.4, enter `I` next to the data set to see its allocated and used space, its secondary amount and how many extents it has. If it shows 16 extents on one volume, it hit the extent limit.


## How to fix it

- Ask for more space, in cylinders for big files, for example `SPACE=(CYL,(50,25),RLSE)`. RLSE gives back unused space when the data set is closed.
- Let the data set use more volumes. `VOL=(,,,3)` sets a volume count of 3. On SMS-managed storage the data class can do this, so ask your storage team.
- For very large data sets, `DSNTYPE=LARGE` removes the 65,535-track limit per volume, and extended format, set up by your storage team, raises the extent limit to 123.
- Before you rerun, delete the partly written data set, or make sure the step creates it fresh. Then restart from the failed step.


## What it looks like


```text
IEC030I B37-04,IFG0554A,PAYRUN01,STEP030,RPTOUT,0A82,WRK017,PROD.PAYROLL.REPORT
IEA995I SYMPTOM DUMP OUTPUT
  SYSTEM COMPLETION CODE=B37  REASON CODE=00000004
IEF450I PAYRUN01 STEP030 - ABEND=SB37 U0000 REASON=00000004
```


## IBM documentation

[IBM z/OS: B37](https://www.ibm.com/docs/en/zos/3.1.0?topic=codes-b37). 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

[SD37 Primary space full, no secondary Read →](https://wndsoftware.com/mainframe-errors/sd37)
[SE37 Out of space, no more volumes or extents Read →](https://wndsoftware.com/mainframe-errors/se37)
[S213 Data set not found on the volume Read →](https://wndsoftware.com/mainframe-errors/s213)
[S013 Data set could not be opened Read →](https://wndsoftware.com/mainframe-errors/s013)
[S237 End-of-volume error Read →](https://wndsoftware.com/mainframe-errors/s237)
[S722 Output limit exceeded Read →](https://wndsoftware.com/mainframe-errors/s722)

## Questions


### What is the difference between SB37, SD37 and SE37?

SB37 means the data set asked for more space and couldn't get it. SD37 means it had no secondary amount, so it couldn't ask. SE37 means it had used every volume or extent it is allowed, as a full PDS does.


### Why do I get SB37 when the volume has free space?

Usually the data set reached the 16-extent limit on that volume. Small secondary amounts hit the limit early, so ask for larger amounts or for cylinders.

[z/OS system abends](https://wndsoftware.com/mainframe-errors/zos-abends) · [SB14](https://wndsoftware.com/mainframe-errors/sb14) · [SD37](https://wndsoftware.com/mainframe-errors/sd37)

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