System abend

S213: Data set not found on the volume

An S213 abend means OPEN looked for a data set on a disk volume and couldn't find it, or couldn't use what it found. The most common form, 213-04, means the data set isn't in that volume's table of contents, usually because the catalog or the JCL points to the wrong volume.

Also written as 213, S213-04, 213-04, abend 213, system abend 213, IEC143I 213-04.

What it means

Every disk volume has a VTOC, a table of contents that holds a label (a DSCB) for each data set on it. During allocation, z/OS decides which volume a data set is on, either from the catalog or from VOL=SER in the JCL. When the program opens the data set, OPEN reads that volume's VTOC to get the label. If the label isn't there, or can't be used, OPEN issues message IEC143I and ends the step with system completion code 213.

So an S213 usually means the catalog and the disk disagree, or the JCL sent the system to the wrong disk.

The reason code after the dash narrows it down. 213-04, by far the most common, means the label wasn't found in the volume's VTOC. Look up any other code under abend 213 in IBM's system codes manual.

Common causes

  • The data set was deleted or moved, but the catalog still points to the old volume. This happens when a data set is scratched without being uncataloged, or when a volume is restored or reinitialized and the catalog isn't.
  • The JCL codes VOL=SER and UNIT for an existing data set, and the volume serial is wrong or out of date. With VOL=SER, the system goes straight to that volume and doesn't consult the catalog.
  • The data set name is mistyped in JCL that also codes VOL=SER, so the system looks for a name that doesn't exist on that volume.
  • Less often, an I/O error stopped OPEN from reading the volume's VTOC. IOS000I in the system log shows it.

How to find the problem

  1. Find IEC143I in the job log. It shows the reason code, the DD name, the device, the volume serial and the data set name.
  2. Check the catalog with LISTCAT ENTRIES('dsname') ALL or ISPF 3.4. Note which volume the catalog says the data set is on.
  3. List that volume's VTOC. In ISPF 3.4, enter the volume serial and leave the data set name blank, or run IEHLIST LISTVTOC in batch. If the data set isn't listed there, the catalog entry or the JCL is wrong.
  4. Look at the DD statement. If it codes VOL=SER, compare that serial with the catalog. A VOL=SER left over from an old version of the JCL is a common source.
  5. If the data set seems to be gone, check whether DFSMShsm has a backup of it, with the HLIST command or through your storage team.

How to fix it

  • If the data set is on a different volume, remove VOL=SER from the JCL and let the catalog find it, or correct the serial.
  • If the catalog points to the wrong volume, remove the stale entry with IDCAMS DELETE 'dsname' NOSCRATCH, which leaves the data on disk alone. Then catalog the data set on its real volume with IDCAMS DEFINE NONVSAM, giving the volume and device type.
  • If the data set is really gone, restore it from backup, for example with HRECOVER, or rerun the job that creates it.
  • For SMS-managed data sets, don't code VOL=SER for existing data sets. Let the catalog locate them.

What it looks like

IEC143I 213-04,IFG0194D,ACCTB01,STEP020,OLDMAST,0B21,PRD204,PROD.ACCTS.MASTER
IEA995I SYMPTOM DUMP OUTPUT
  SYSTEM COMPLETION CODE=213  REASON CODE=00000004
IEF450I ACCTB01 STEP020 - ABEND=S213 U0000 REASON=00000004

Questions

Why didn't I get a JCL error instead of S213?

Allocation trusts the catalog, or your VOL=SER, and doesn't read the volume's table of contents. The missing label is only discovered when the program opens the data set. If the data set isn't cataloged and you didn't code VOL=SER, you get a JCL error such as IEF212I instead.

Does S213 mean my data set is lost?

Not always. The data set often still exists on another volume and only the catalog entry or the JCL is wrong. Check the catalog and the likely volumes before you restore from backup.

What is the difference between S213 and S013?

Both come from OPEN. S213 means the data set's label couldn't be found or used on the volume. S013 means the data set was found, but the request conflicts with it, such as a missing member or a block size that doesn't fit.