System abend

SB37: Out of space

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.

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.

CodeMessageWhat happened
SB37IEC030IThe data set asked for another extent and couldn't get one on its volume, and it had no other volume to move to
SD37IEC031IThe primary space filled and no secondary space was ever requested, so the data set couldn't ask for more
SE37IEC032IThe 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

  1. Read IEC030I. It gives the reason code, the job, step and DD name, the volume serial and the data set name.
  2. 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.
  3. 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

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

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.