z/OS message

IDC3300I: Error opening a data set

IDC3300I means IDCAMS couldn't open the named data set for a command such as REPRO, PRINT or VERIFY. For a VSAM data set the next message, IDC3351I, gives the VSAM OPEN return code, and that code says why the open failed.

Other names for this code

Also written as IDC3300, IDC3300I ERROR OPENING, IDC3300I IDC3351I, IDC3300I open return code 168, IDC3300I open return code 160, IDCAMS error opening.

What it means

Commands that read or write records, such as REPRO, PRINT, VERIFY, EXPORT and IMPORT, have to open their data sets first. When an open fails, IDCAMS writes IDC3300I with the data set name and stops that command.

The reason comes in the lines after it. For VSAM, IDC3351I shows VSAM OPEN RETURN CODE IS followed by a decimal code from VSAM. The job log often has an IEC161I message for the same open with more detail. For a non-VSAM data set, look in the job log for the OPEN message from the access method instead.

Two VSAM OPEN codes come up most often.

  • 160 means the open options conflict with each other or with the catalog entry for the data set. It also happens when a VSAM cluster that has never had a record written to it is opened for input. An IEC161I message showing 072-053 (return code 072) often goes with the empty-cluster case.
  • 168 means the data set isn't available for the kind of processing asked for. Usually another job, a CICS region or an earlier allocation in the same step is holding it.

The command fails, and IDCAMS goes on to the next command with a nonzero condition code.

Common causes

  • A CICS region or another job has the VSAM file open, so the batch open is refused (return code 168).
  • The same step deletes and redefines a cluster and then uses a DD statement for it. The DD was allocated when the step started, to the cluster that no longer exists.
  • REPRO, PRINT or VERIFY tries to open an empty cluster for input (return code 160).
  • The open options don't match the cluster's catalog definition (return code 160).
  • The user ID lacks RACF access to the data set. ICH408I appears in the job log.

How to find the problem

  1. Read the IDC3351I line after IDC3300I in SYSPRINT and note the OPEN return code.
  2. Look in the JES job log for IEC161I for the same data set. Its function and return codes add detail.
  3. For 168, find who holds the data set. D GRS,RES=(*,PROD.PAYROLL.MASTER) from the console shows the jobs or regions with an enqueue on it.
  4. For 160, run LISTCAT ENTRIES('PROD.PAYROLL.MASTER') ALL and check whether the cluster has any records.
  5. Check the JCL for the DD the command uses, and whether its data set is deleted or redefined earlier in the same step.

How to fix it

  • For 168, close the file in the CICS region first, for example with CEMT SET FILE(PAYMAST) CLOSED, or schedule the job when the other user is finished.
  • Use DISP=OLD on DD statements for jobs that need the data set to themselves.
  • Put REPRO in a separate step after a DELETE and DEFINE, or use OUTDATASET instead of OUTFILE so IDCAMS allocates the new cluster itself.
  • For an empty cluster, load at least one record before anything opens it for input, or skip the step when the cluster is empty.
  • For a security failure, get the access ICH408I names.

What it looks like

IDC3300I ERROR OPENING PROD.PAYROLL.MASTER
IDC3351I ** VSAM OPEN RETURN CODE IS 168

IBM documentation

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

Report a correction to WND Software.

Questions

What does IDC3300I with VSAM OPEN return code 168 mean?

The data set isn't available for the processing asked for, most often because another job or a CICS region has it open. Find the holder with a GRS display and close it there first.

Why can't IDCAMS open my empty KSDS?

VSAM can't open a cluster that has never held a record for input. The open fails with return code 160. Load a record first or skip the step.

Why did REPRO fail to open a cluster I just defined?

If the DELETE, DEFINE and REPRO are in one step, the DD was allocated to the old cluster before the step started. Move REPRO to its own step or use OUTDATASET.