Mainframe Path Start learning free
BeginnerError and abend codesSB37

SB37 / SD37 / SE37 — out of space

An output dataset could not get more space. B37, D37 and E37 each fail for a different reason, so read the code before you change SPACE.

What happened

A step writing an output dataset ends with SB37, SD37 or SE37. An IEC message names the DD and the dataset.

Typical JES messages (illustrative)
IEC030I B37-04,IFG0554A,PAYJOB01,STEP030,OUTFILE,0A41,PRD123,
PROD.PAYROLL.DETAIL.D251008
IEF450I PAYJOB01 STEP030 - ABEND=SB37 U0000 REASON=00000004

D37 is reported with IEC031I and E37 with IEC032I.

What it means

A sequential or partitioned Dataset filled its current space and the system could not give it more. The three codes say why:

CodeWhat stopped the dataset growingFirst thing to check
SB37It needed more space on its current volume, could not get it, and could not continue on another volume.Secondary size, volume count, and whether the output is far bigger than normal.
SD37Primary space was used up and no secondary quantity was specified, so it could not extend at all.The SPACE parameter: add a secondary quantity.
SE37The maximum number of extents or volumes was reached. A PDS cannot span volumes, so this is typical for a full PDS.For a PDS: compress or reallocate larger. For sequential: the volume count.

Typical causes

Symptoms

The failing DD is always an output or an extend. Compare the record count with previous runs: a normal-size output points to SPACE; a huge one points to a loop or bad input. VSAM datasets report space problems through VSAM messages and status codes, not these abends. A full PDS directory is a different abend (SB14), not E37.

Where to look

How to diagnose

  1. Read the exact code: B37, D37 or E37.
  2. Find the DD and dataset from the IEC message.
  3. Check the SPACE parameter and any data class that sets space.
  4. Compare this run's record count with normal runs.
  5. If the volume is the problem, ask storage administration about free space in the storage group.

How to fix

  1. D37: add a secondary quantity.
  2. B37 or E37 on sequential: raise primary to cover normal volume, and make the secondary large enough not to run out of extents.
  3. E37 on a PDS: compress it (IEBCOPY or Z in 3.4) or reallocate it larger, or use a PDSE.
  4. Add RLSE so unused space is returned at close.
  5. Delete the partial output, or let the step's DISP handle it, then rerun the step.

Some SMS data classes allow extra volumes or space constraint relief; that is site configuration, so check with your storage team.

How to prevent

Production considerations

Interview question

What is the difference between SB37, SD37 and SE37?

Stuck on something else?
Ask the community or search the full course.

Ask a question