System abend

S237: End-of-volume error

An S237 abend means end-of-volume processing found that a tape didn't match what the system expected. Reason 04 means the number of blocks read doesn't match the count in the trailer label. Reason 08 means the header label on the next volume of a multivolume data set names a different data set.

Also written as 237, S237-04, S237-08, 237-04, 237-08, abend 237, system abend 237.

What it means

A standard-labeled tape has a header label in front of each data set and a trailer label after it. The trailer records how many blocks were written. When a program reading the tape reaches the end of a volume, end-of-volume processing compares that count with the number of blocks it actually read. If the data set continues on another volume, it also checks that the next volume's header names the same data set. When a check fails, the system issues message IEC023I and ends the step with system completion code 237.

  • 237-04 means the block count doesn't match. A block was lost, skipped or added somewhere between writing the tape and reading it now. The data is suspect, so don't try to get around the check.
  • 237-08 means the header label on the next volume names a different data set. The volume list is wrong or out of order, or the volume has been reused.

Virtual tape volumes carry the same labels as physical ones, so the same checks and the same abend apply there.

Common causes

  • A drive or media problem lost or skipped a block, either when the tape was written or when it was read (237-04).
  • The volume serials in the JCL for a multivolume data set are in the wrong order, or one of them is wrong (237-08).
  • The catalog lists the volumes of a multivolume data set in the wrong order, or includes a volume that belongs to another data set (237-08).
  • A volume that held part of the data set expired, went back to scratch and was written again by another job, so it now holds a different data set (237-08).

How to find the problem

  1. Find IEC023I in the job log. It gives the reason code, the DD name, the drive address, the volume serial and the data set name.
  2. For 237-04, look for IEC537I just before it. It shows the block count from the trailer label next to the count the job read. Then check SYSLOG or OPERLOG for tape I/O error messages on that drive around the same time. If you can, read the tape on a different drive. If it fails the same way everywhere, the data on the tape is bad.
  3. Check the job log of the job that created the tape. Look for errors while it was writing, and for the IEF285I messages that list the volume serials it wrote, in order.
  4. For 237-08, compare those volume serials with the list in your JCL or the catalog. LISTCAT ENTRIES('dsname') ALL shows the cataloged volumes in order.
  5. Ask your tape management team to look each volume up in the tape management system, such as DFSMSrmm. It shows which data set each volume holds now and whether it has been reused.

How to fix it

  • Recreate the data set by rerunning the job that wrote it, if its input still exists, then rerun the failed job.
  • Restore the data from another copy, such as a duplicate or backup tape.
  • Correct the volume order in the JCL, or remove VOL=SER and let the catalog supply the volumes. Fix the catalog entry if it lists them out of order.
  • If errors point to a drive, have operations or the hardware team check it, and keep that tape out of use until it has been verified.
  • Give tapes that hold live data a retention period long enough that they can't return to scratch while jobs still read them.

What it looks like

IEC537I BLOCK COUNTS: TLABEL=104227, DCB=104219
IEC023I 237-04,IFG0552R,PAYRUN01,STEP040,HISTIN,0581,P10023,PROD.PAYROLL.HISTORY
IEA995I SYMPTOM DUMP OUTPUT
  SYSTEM COMPLETION CODE=237  REASON CODE=00000004
IEF450I PAYRUN01 STEP040 - ABEND=S237 U0000 REASON=00000004

Questions

Can I bypass the block count check on S237-04?

There are ways to read a tape without label processing, but that hides the problem. A count mismatch means the data may be missing blocks, so recreate or restore the data set instead.

Does S237 happen on virtual tape?

Yes. Virtual tape volumes carry the same labels as physical tapes, so a wrong volume order or a reused volume causes the same 237-08.

Is S237 a space problem?

No. Running out of space shows up as SB37, SD37 or SE37. S237 means labels or block counts didn't match at the end of a volume.