z/OS message

IDC3351I: VSAM OPEN, CLOSE or I/O return code

IDC3351I gives the return code VSAM sent back when an IDCAMS command failed to open, close, read or write a VSAM data set. The message says which operation failed (OPEN, CLOSE or I/O) and gives the code in decimal. For I/O errors it also shows the RPL feedback word, RPLFDBWD.

Other names for this code

Also written as IDC3351, IDC3351I VSAM I/O RETURN CODE IS 108, IDC3351I VSAM OPEN RETURN CODE IS 160, IDC3351I 168, IDC3351I RPLFDBWD, VSAM I/O return code 108.

What it means

IDCAMS uses VSAM to read and write VSAM data sets. When VSAM rejects a request, IDCAMS shows VSAM's answer in IDC3351I. It usually comes after a message that names the data set, such as IDC3300I for an open failure or IDC3302I for a failed action on the data set.

The message has three forms. VSAM OPEN RETURN CODE IS n and VSAM CLOSE RETURN CODE IS n give the error code from the open or close. VSAM I/O RETURN CODE IS n is for a read or write, and adds RPLFDBWD = X'8408006C' or similar. In that feedback word, the second byte is VSAM's return code (08 for a logical error) and the last byte is the reason code in hex. X'6C' is 108, the same number the message shows in decimal.

The full lists of codes are in IBM's DFSMS Macro Instructions for Data Sets, in the chapter on VSAM macro return and reason codes. The codes that come up most often are these.

  • I/O return code 108 means the record length was wrong. It was zero, longer than the data set allows, or too short to hold the key.
  • OPEN return code 160 means the open options conflict with each other or with the catalog entry. It also happens when an empty cluster is opened for input.
  • OPEN return code 168 means the data set isn't available for the processing asked for, usually because someone else has it.

Common causes

  • I/O 108 from REPRO when the input records are longer than the cluster's maximum record size. In-stream data from a DD * statement is 80 bytes, so it fails against a cluster defined with a smaller RECORDSIZE.
  • I/O 108 when writing to a base cluster updates a non-unique alternate index whose record would grow past its maximum size. IBM documents this for an AIX with too small a MAXLRECL.
  • OPEN 160 when IDCAMS opens an empty cluster for input, or when the open options don't match the cluster definition.
  • OPEN 168 when a CICS region or another job holds the data set, or when a DD points to a cluster deleted and redefined in the same step.
  • Vendor products can cause these codes too. Broadcom documents I/O 108 from CA Compress when a custom compression table no longer fits the data.

How to find the problem

  1. Read the operation (OPEN, CLOSE or I/O) and the decimal code in IDC3351I, and the message above it that names the data set.
  2. For an I/O error, take the last byte of RPLFDBWD and convert it to decimal to cross-check the code.
  3. Run LISTCAT ENTRIES('PROD.PAYROLL.MASTER') ALL to see the RECORDSIZE, key and record count of the cluster, and of any alternate indexes.
  4. Compare the input data set's LRECL with the cluster's maximum record size when the failing command is REPRO.
  5. Look up any other code in the DFSMS Macro Instructions for Data Sets manual for your release.

How to fix it

  • For 108 on REPRO, make the input records fit the cluster. Build an input file with the right record length, or redefine the cluster with a RECORDSIZE that matches the data.
  • For 108 from an alternate index, redefine the AIX with a MAXLRECL big enough for all the pointers one key can collect.
  • For OPEN 160 on an empty cluster, load a record first or skip the step when the cluster is empty.
  • For OPEN 168, free the data set first. Close it in CICS, wait for the other job, or split the DELETE, DEFINE and REPRO into separate steps.

What it looks like

IDC3302I ACTION ERROR ON PROD.PAYROLL.MASTER
IDC3351I ** VSAM I/O RETURN CODE IS 108 - RPLFDBWD = X'8408006C'

IBM documentation

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

Report a correction to WND Software.

Questions

What does IDC3351I VSAM I/O return code 108 mean?

The record length VSAM was given is invalid for the data set. On REPRO it usually means the input records are longer than the cluster allows.

How do I read RPLFDBWD in IDC3351I?

The last byte is the reason code in hex. For X'8408006C', X'6C' is 108, which matches the return code in the message.

Where is the full list of IDC3351I return codes?

In IBM's z/OS DFSMS Macro Instructions for Data Sets, in the chapter on VSAM macro return and reason codes. I/O codes are listed there as logical error reason codes in the RPL feedback area.