z/OS message

IDC3009I: VSAM catalog return code and reason code

IDC3009I means catalog management returned an error to IDCAMS or another caller, and the message gives the return code and reason code that say why. The most common pairs are 8-42 (entry not found in the catalog) and 8-38 (the name already exists).

Other names for this code

Also written as IDC3009, IDC3009I return code 8 reason code 42, IDC3009I 8-42, IDC3009I RC 8 RSN 38, VSAM catalog return code is 8, IGG0CLEG-42, catalog return code 50.

What it means

Every catalog request on z/OS goes through catalog management. That covers DEFINE, DELETE, ALTER, LISTCAT, allocation of a cataloged data set and more. When catalog management can't do what was asked, it hands back a return code and a reason code. IDC3009I is the message that shows them. It also names the catalog module that detected the problem, written in the form IGG0CLxx, and adds subfunction information when there is any.

The return code says what kind of problem it was, and the reason code narrows it down. To read the message, find the return code in IBM's list for IDC3009I, then the reason code under it. The list is long, and IBM adds codes in new releases, so look up the exact pair in the z/OS MVS System Messages volume for your release.

The common return codes are below.

  • Return code 4 means a catalog couldn't be opened or closed. Some reason codes point to storage shortages, others to a damaged or disconnected catalog.
  • Return code 8 means the entry wasn't found on a lookup, or already exists on an add. Reason 42 is a lookup that failed. Reason 38 is a DEFINE of a name that is already cataloged.
  • Return code 42 is a DADSM error while allocating, renaming or scratching space. IEC331I gives the details.
  • Return code 50 is an error in the VVDS, the volume's VSAM data set. Reason 6 means the record for the data set wasn't on the volume.
  • Return code 56 is a failed security check, usually missing RACF authority to the data set or catalog.
  • Return code 68 means there wasn't enough space on the volume for the request.

The system ends the request that failed. IDCAMS usually continues with the next command and sets the condition code, often 8 or 12.

Common causes

  • Return code 8 with reason 42 comes from a DELETE, LISTCAT or ALTER that names an entry the searched catalog doesn't have. The name is misspelled, the data set was already deleted, or its alias points to a different catalog.
  • Return code 8 with reason 38 comes from a DEFINE of a name that is already cataloged, often because a rerun didn't delete the data set left by the failed run.
  • Return code 56 means the user ID lacks RACF authority to define, delete or alter the data set or to update the catalog.
  • Return code 68 means the volumes in the request don't have enough free space for the data set.
  • Return code 50 with reason 6 means the catalog has an entry but the volume's VVDS has no record for it, so the catalog and the volume disagree.
  • Return code 4 means a user catalog can't be opened, for example because it was disconnected or damaged.

How to find the problem

  1. Read the return code and the number after the hyphen in the reason field. For example, IGG0CLEG-42 means reason code 42.
  2. Look at the IDCAMS command just above IDC3009I in SYSPRINT. Messages that come with it, such as IDC3012I for an entry not found or IDC0551I for an entry not deleted, show which name failed.
  3. Run LISTCAT ENTRIES('PROD.PAYROLL.MASTER') ALL to see whether the entry exists and which catalog holds it.
  4. For return codes 42 and 50, look for IEC331I in the job log. It carries the lower-level error details.
  5. For return code 56, look for ICH408I in the job log. It names the resource and access level RACF denied.

How to fix it

  • For 8-42 on a DELETE in a rerun step, the data set is already gone. Add SET MAXCC=0 after the DELETE, or test with LISTCAT first, so a missing entry doesn't fail the job.
  • For 8-38, delete the old entry first or use a different name.
  • For 56, ask the security team for the access ICH408I names.
  • For 68, ask for less space, add volumes, or use a storage class with more room.
  • For 50 and 4, involve storage administration. IBM recommends DIAGNOSE to compare the catalog with the VVDS.

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 z/OS documentation. Use the documentation for your installed release.

This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.

Report a correction to WND Software.

Questions

What does IDC3009I return code 8 reason code 42 mean?

The entry wasn't found in the catalog that was searched. Check the name and which catalog its high-level qualifier points to with LISTCAT.

Why do I get IDC3009I 8-42 on every rerun?

The job's first step deletes a data set that the previous run already deleted. Set MAXCC=0 after the DELETE, or delete only when LISTCAT finds the entry.

Where is the full list of IDC3009I codes?

In IBM's z/OS MVS System Messages, Volume 6, under IDC3009I. The list is grouped by return code, and new releases add codes.