What it means
The SPACE parameter has two amounts. The primary amount is allocated when the data set is created. The secondary amount is what the system adds, one extent at a time, when the primary fills. If the secondary amount is zero or missing, as in SPACE=(CYL,10), the data set can never be bigger than its primary space. When a program tries to write past that point, the system has nothing to ask for and ends the step with system completion code D37.
The volume may have plenty of free space. That doesn't matter, because the data set isn't allowed to ask for more. In an SB37, by contrast, the data set did ask and the space wasn't there.
| Code | Message | What happened |
|---|---|---|
| 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 | IEC031I | The primary space filled and no secondary space was ever requested, so the data set couldn't ask for more |
| SE37 | IEC032I | The data set had already used every volume or extent it is allowed. A full PDS is the classic case |
Message IEC031I gives the code and reason with the job, step, DD name, volume and data set name. Reason code 04 is the one you'll nearly always see, and it means exactly the case above.
Common causes
- SPACE was coded with no secondary amount, such as
SPACE=(TRK,15). - The data set was created long ago, through ISPF or a utility step, with a secondary amount of 0. Jobs that write to it with DISP=OLD or DISP=MOD have now filled it.
- The input grew, and the primary amount that used to be enough no longer is.
- A PDS created with no secondary amount has filled up as members were added or replaced.
- A loop in the program wrote far more records than it should.
How to find the problem
- Read
IEC031Ifor the DD name and the data set name. - Look at SPACE on that DD. If there's only one amount, or the second amount is 0, that's the cause.
- If the job writes to an existing data set, check it in ISPF option 3.4 with the
Iline command. A secondary amount of 0 confirms it. - Compare the records written with a normal run. If the output is far larger than usual, look for a loop or a change in the input.
How to fix it
- Add a secondary amount.
SPACE=(CYL,(10,5),RLSE)starts at 10 cylinders and can grow by 5 at a time, and RLSE returns what isn't used. - For an existing data set with no secondary, allocate a new one with a secondary amount, copy the data across with IEBGENER or ISPF option 3.3, then rename the two.
- For a PDS, compress it first, which may free enough space. If it's still full, reallocate it with a secondary amount and copy the members across.
- Make a secondary amount part of your JCL standards, so new jobs don't repeat the problem.
- Rerun from the failed step once the data set has room, deleting or recreating any partly written output first.
What it looks like
IEC031I D37-04,IFG0554P,ACCTLD01,STEP010,EXTRACT,0A61,WRK009,TEST.ACCT.EXTRACT IEA995I SYMPTOM DUMP OUTPUT SYSTEM COMPLETION CODE=D37 REASON CODE=00000004 IEF450I ACCTLD01 STEP010 - ABEND=SD37 U0000 REASON=00000004