z/OS message

IEC161I: VSAM open, close or end-of-volume problem

IEC161I is a VSAM message from OPEN, CLOSE or end-of-volume processing. The return code at the start says what VSAM found, and depending on that code the message is either a warning and processing continues, or the open fails.

Other names for this code

Also written as IEC161I, IEC161I 032, IEC161I 060, IEC161I 205, VSAM open error IEC161I, IEC161I VSAM.

What it means

A program opens a VSAM data set through an access control block (ACB) rather than a DCB. When VSAM's open, close or end-of-volume routines find something wrong, or something worth reporting, they write IEC161I. The same message number covers a long list of conditions, so the return code is the part that matters.

The message format is IEC161I rc[(sfi)]-ccc,jjj,sss,ddname,dev,volser,xxx,dsname,cat. Here rc is the return code, and sfi is extra information from another component, shown only for some return codes. ccc is a problem determination code meant mainly for IBM support. Then come the job name, step name, DD name, device number and volume serial, and xxx, the cluster name (or the data set name from the DD statement if the cluster name isn't available). Last are the name of the component being processed and the catalog name. Any field that doesn't apply is left as an empty comma. For a step inside a procedure, the procedure step name and the calling step name run together with no comma between them. A cluster name of AMASTCAT means the master catalog is involved.

Most return codes also set an error code in the ACB, so the program sees the result on its OPEN. Whether the open goes ahead depends on the code. A few examples from IBM's list:

  • 001 is a warning about system-managed buffering. VSAM couldn't use the direct optimized technique it was asked for and used another one. The open continues.
  • 032 means the catalog record for the data set wasn't found. The open, close or end-of-volume request ends and an SVC dump is taken.
  • 059 and 060 mean the time stamp on the volume doesn't match the one in the catalog. With 059 the data set was opened for input and the open continues, but results are unpredictable. With 060 it was opened for output and the open fails.
  • 205 means the VVDS manager returned an unexpected error, which points at the VSAM volume data set on the volume.
  • 211 means end-of-volume processing failed, usually during an extend. The sfi gives an SMS return and reason code.
  • 229 means a catalog error during media manager catalog processing. The sfi holds the catalog return code, reason code and module.

Return codes and their meanings change between releases, so look up the exact code under IEC161I in z/OS MVS System Messages for your release.

Common causes

  • The catalog entry for the data set can't be found or read, often because the catalog's volume isn't online or the wrong catalog is being searched (return code 032 and catalog codes passed through the sfi).
  • The catalog and the volume disagree, for example after a volume was restored without the catalog, or the other way round (return codes 059 and 060).
  • The VSAM volume data set (VVDS) on the volume is damaged or out of step with the catalog (return code 205).
  • An extend failed because SMS couldn't get space or another volume (return code 211).
  • A buffering option asked for more than VSAM could provide, which only produces a warning (return code 001).

How to find the problem

  1. In SDSF, find IEC161I in the job log. Note the return code, any value in brackets after it, the ccc value, the DD name, the cluster name and the catalog name.
  2. Look up the return code under IEC161I in z/OS MVS System Messages for your release. It tells you whether the open failed or continued.
  3. If the sfi holds a catalog return and reason code, look them up under IDC3009I. If it holds an SMS reason code, look up the IGD message with that number. A reason of 17206 points to IGD17206I, for example.
  4. Run LISTCAT ENTRIES('PROD.PAYROLL.KSDS') ALL to see what the catalog holds for the cluster and which volumes it is on.
  5. For VVDS problems, your storage team can run the IDCAMS DIAGNOSE command against the VVDS on that volume.

How to fix it

  • For a catalog record not found, make sure the right catalog is available and its volume is online, then rerun.
  • If the data set was open for output when the error hit, run IDCAMS VERIFY against the cluster before using it again, so the catalog's end-of-file information is correct.
  • For a time stamp mismatch, decide which is more current, the volume or the catalog, and recover the other one. Your storage team will follow z/OS DFSMS Managing Catalogs.
  • For a VVDS error, run DIAGNOSE and repair the VVDS or the data set as it shows.
  • For an extend failure, fix the SMS cause shown by the IGD message, such as adding volumes to the storage group.

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

Does IEC161I always mean the open failed?

No. Some return codes, such as 001 and 059, are warnings and the open goes ahead. Others, such as 032 and 060, stop the open. Look up the return code to tell which.

What is the ccc field?

It is a problem determination code that tells IBM support where in VSAM the condition was found. You rarely need it unless you open a case with IBM.

Why does IEC161I show AMASTCAT?

The master catalog is involved. If the master catalog itself fails to open, the cause has to be fixed and the system IPLed again.