IDC3012I: Entry not found
IDC3012I means an IDCAMS command such as DELETE, ALTER or LISTCAT named a data set or other entry that wasn't found in the catalog that was searched. It usually comes with IDC3009I return code 8, reason code 42, and the command ends with condition code 8.
Other names for this code
Also written as IDC3012, IDC3012I ENTRY NOT FOUND, IDC3012I IDC3009I 8 42, IDCAMS entry not found, IDC3012I IDC0551I, IDCAMS DELETE not found.
What it means
IDCAMS finds data sets through the catalog. When a command names an entry, IDCAMS asks catalog management to look it up. If the entry isn't in the catalog that was searched, IDCAMS writes IDC3012I with the name.
The detail comes in the next message, IDC3009I. For a plain miss it shows catalog return code 8 with reason code 42, in a module such as IGG0CLEG. On a DELETE you also get IDC0551I, which says the entry wasn't deleted. The command ends with condition code 8, and so does the step unless a SET statement lowers it.
IDC3012I is often harmless. Jobs commonly delete a data set at the start so they can create it again, and on a first run, or a rerun after a clean-up, there is nothing to delete. Broadcom documents the same messages as expected output from one of its Db2 utilities, which deletes data sets that may not exist.
It matters when the entry should be there. Then the name is wrong, the data set was never cataloged, or the catalog search went to a different catalog from the one you expected. The high-level qualifier's alias in the master catalog decides which user catalog is searched, unless the command names a catalog itself.
Common causes
- A DELETE at the start of a job runs when the data set doesn't exist, for example on a rerun after the data set was already deleted.
- The name in the command is misspelled, or has the wrong qualifier or generation.
- The data set exists on a volume but isn't cataloged. IDCAMS DELETE works from the catalog, so it can't find it.
- The high-level qualifier's alias points to a different user catalog than the one the data set is in, or the command's CATALOG parameter names the wrong catalog.
- A previous step or job already deleted or renamed the entry.
How to find the problem
- Read the entry name in IDC3012I in SYSPRINT, and the command just above it.
- Check IDC3009I below it. Return code 8 with reason 42 confirms a plain not-found. A different code points to a different problem, so look that pair up.
- Run
LISTCAT ENTRIES('PROD.to see whether the entry exists and in which catalog.PAYROLL. MASTER') ALL - If you think the data set is on disk but not cataloged, look for it by volume, for example with ISPF option 3.4 and a volume serial.
How to fix it
- If a missing entry is fine, add
IF LASTCC = 8 THEN SET MAXCC = 0right after the DELETE. Note that this also hides other errors that end with condition code 8. - Correct the name in the command if it was wrong.
- Catalog the data set, or remove an uncataloged one another way, for example with an IEFBR14 step that names the volume and uses DISP=(OLD,
DELETE). - If the alias points to the wrong catalog, involve storage administration. Don't add a CATALOG parameter as a workaround without knowing why the alias differs.
What it looks like
IDC3012I ENTRY PROD.PAYROLL.MASTER NOT FOUND IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42 IDC0551I ** ENTRY PROD.PAYROLL.MASTER NOT DELETED IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8
IBM documentation
IBM documentation: IDC3012I. Use the documentation for your installed release.
Related codes
Questions
Is IDC3012I an error?
It ends the command with condition code 8, which many jobs treat as an error. Whether it matters depends on whether the entry should exist. A DELETE of something already gone is usually harmless.
How do I stop IDC3012I failing my job?
Put IF LASTCC = 8 THEN SET MAXCC = 0 after the DELETE. That resets the condition code so the step ends with 0.
Why can't IDCAMS find a data set I can see on the volume?
It isn't cataloged, or it is cataloged in a catalog the search didn't use. IDCAMS finds entries through the catalog, not by scanning volumes.