z/OS message

IEF212I: Data set not found

IEF212I DATA SET NOT FOUND means z/OS couldn't find a data set named on a DD statement while it was setting up a job step, usually because the name isn't in the catalog. The step doesn't run, and the job ends with IEF453I JOB FAILED - JCL ERROR.

Other names for this code

Also written as IEF212, DATA SET NOT FOUND, IEF212I DATA SET NOT FOUND, dataset not found JCL error, IEF212I JCL error.

What it means

Before a step's program is loaded, z/OS allocates every DD statement in the step. For a data set that should already exist, such as one coded with DISP=SHR or DISP=OLD and no volume, it looks the name up in the catalog to find out where the data set lives. If the catalog has no entry for that name, allocation fails and IEF212I goes to the job's system messages.

The message names the job, the procedure step if there is one, the step and the DD name. It doesn't repeat the data set name, so you have to look it up in the JCL.

IEF272I STEP WAS NOT EXECUTED follows for the same step, and the job ends with IEF453I JOB FAILED - JCL ERROR. Steps before this one have already run. They may have created, deleted or updated data sets, and that matters when you decide how to rerun.

This check comes later than the syntax check. A misspelled keyword stops the whole job at submission with IEFC452I, before any step runs. IEF212I only happens once the job reaches the step, which is why a TYPRUN=SCAN check doesn't catch it. A scan reads the JCL but doesn't look in the catalog.

Common causes

  • The data set name is misspelled, or a symbolic parameter such as &HLQ resolved to a different qualifier than expected. A symbol that resolves to nothing can leave a name that was never created.
  • The job or step that should have created the data set didn't run, failed, or deleted it at the end.
  • A new generation such as PROD.PAYROLL.HIST(+1) was requested before the generation data group base was defined.
  • A backward reference such as DSN=*.STEP020.OUTFILE points to a data set from a step that was bypassed, so the data set was never created.
  • The data set exists on disk but was never cataloged, or it's cataloged in a user catalog that isn't connected to its high-level qualifier.

How to find the problem

  1. In SDSF, open JESYSMSG for the job. IEF212I gives the step and DD name, and IEF272I follows it.
  2. Open JESJCL and find that step and DD statement. If the name uses symbols, read the IEFC653I SUBSTITUTION JCL line under the statement. It shows the name after substitution, which is the name z/OS looked for.
  3. Check the catalog. In ISPF option 3.4, enter the name as the data set level. From TSO or a batch IDCAMS step, run LISTCAT ENTRIES('PROD.PAYROLL.MASTER') ALL. If the entry isn't found, the data set isn't cataloged under that name.
  4. For a generation data group, list the base with LISTCAT to see whether it's defined and which generations exist.
  5. Look at the job or step that should have created the data set. Its IEF285I disposition messages show whether the data set was cataloged, kept or deleted.

How to fix it

  • Correct the data set name or the symbol value. Then rerun from the failed step with RESTART=STEP020 on the JOB statement if the earlier steps don't need to run again.
  • Run the job that creates the data set first, or fix its disposition so the data set is cataloged, for example DISP=(NEW,CATLG,DELETE).
  • Define the GDG base with an IDCAMS DEFINE GENERATIONDATAGROUP statement before the first run that creates a +1 generation.
  • If the data set is on disk but not cataloged, catalog it with IDCAMS DEFINE NONVSAM, giving its volume. Coding UNIT and VOL=SER on the DD statement also works as a short-term fix.
  • For a backward reference to a bypassed step, point to the step that really creates the data set, or give the data set a name of its own.
  • If an input file is genuinely optional, an earlier IEFBR14 step with DISP=(MOD,CATLG) creates an empty one when it's missing and leaves an existing one alone.

What it looks like

IEF142I PAYRUN01 STEP010 - STEP WAS EXECUTED - COND CODE 0000
IEF212I PAYRUN01 STEP020 PAYIN - DATA SET NOT FOUND
IEF272I PAYRUN01 STEP020 - STEP WAS NOT EXECUTED.

IBM documentation

IBM documentation: IEF212I. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Did the earlier steps in my job run?

Yes. IEF212I happens when the job reaches the failing step, so every step before it has already run. Check what they did before you resubmit the whole job.

Why didn't TYPRUN=SCAN catch it?

A scan only checks the JCL itself. It doesn't look in the catalog, so a missing data set only shows up when the step is set up.

What is the difference between IEF212I and S213?

IEF212I happens at allocation, when the catalog has no entry for the name. An S213 abend happens later, when a program opens the data set and it isn't on the volume the catalog or the DD statement points to.