JCL & Batch Troubleshooting
SB37 insufficient space condition
SB37 means the program ran out of space on the current volume while writing a dataset, and no more space could be obtained there.
What it means
- SB37 (often grouped with SD37/SE37 as "Bx37" abends) is a space abend during output.
- The dataset needed another extent or volume but could not get one.
Common causes
- SPACE parameter too small for the output volume.
- No secondary allocation coded, so the dataset could not extend.
- Volume full; no alternative volumes in the storage group.
- Program writing far more records than expected (runaway output).
How to diagnose
- Check the SPACE parameter on the DD card and the dataset attributes.
- Look at how many records were written before the abend — a huge count suggests runaway output.
- Ask storage support whether the volume or storage group is full.
How to fix it
- Increase primary/secondary SPACE allocation.
- Add more volumes to the storage group or redirect the dataset.
- If output volume is wrong, fix the program logic first.
Example: Generous space allocation (JCL)
//OUTFILE DD DSN=APP.OUT.DATA,DISP=(NEW,CATLG),
// SPACE=(CYL,(50,20),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920)
Secondary extents (20) let the dataset grow; RLSE releases unused space.
Interview tip
- Q: How would you troubleshoot a SB37 insufficient space condition in production?
- A: I would check the SPACE coded versus records written, rule out runaway output, then increase allocation or add volumes.
Prevention checklist
- Size SPACE for peak volumes.
- Always code secondary extents.
- Monitor dataset growth trends.
