COBOL file status

File status 30: Permanent error, no further information

File status 30 means a permanent error on the file, with no more specific status available. It usually points to a physical I/O error on the device or a damaged data set, not a logic problem in the program.

Other names for this code

Also written as FS 30, file status code 30, COBOL status 30, VSAM status 30, permanent I/O error COBOL, status key 30, SK30.

What it means

The 3x class covers permanent errors. The statement failed and running it again won't help. Status 30 is the general code in that class, used when none of the more specific ones (34, 35, 37, 38 or 39) fits.

For VSAM, 30 usually sits on top of a physical error. VSAM returns register 15 = 12, and the feedback code says where the error happened. Feedback 4 (X'04') is a read error in the data component, 8 (X'08') a read error in the index set and 12 (X'0C') a read error in the sequence set. Feedback 16 (X'10'), 20 (X'14') and 24 (X'18') are the matching write errors. The VSAM return code area (data-name-8 of the FILE STATUS clause) holds these values.

For QSAM, a 30 typically means the access method hit an I/O error it couldn't correct, such as an unreadable block on tape or disk. Under the old CMPR2 behavior some attribute conflicts were also reported as 30. Enterprise COBOL reports those as 39.

Common causes

  • A hardware or media problem, such as a failing disk, a damaged tape or a channel error.
  • A damaged VSAM cluster, for example a broken index after a system failure during a control area split.
  • A tape that can't be read on the drive it was mounted on.

How to find the problem

  1. Look in the job log and SYSLOG for I/O error messages at the same time. IOS000I reports a hardware I/O error on a device. A QSAM I/O error that ends in an abend comes with IEC020I and abend 001.
  2. Display data-name-8 for a VSAM file. Return code 12 confirms a physical error, and the feedback code tells you data or index, read or write.
  3. Run IDCAMS EXAMINE with INDEXTEST and DATATEST on a KSDS to check its structure.
  4. Try to read the whole data set with a utility, such as IDCAMS REPRO or PRINT for VSAM, or a copy step for QSAM. If the utility fails at the same place, the problem is the data or the device, not the program.

How to fix it

  • Restore the data set from the last good backup and reapply the changes made since.
  • For a damaged KSDS, copy the readable data to a new cluster with REPRO, or restore it if EXAMINE reports index errors.
  • Have operations or the hardware team check the device if IOS000I messages show errors on it.
  • Rerun the job once the data set is repaired. The program can't work around a 30.

IBM documentation

IBM Enterprise COBOL 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

Is file status 30 a bug in my program?

Rarely. It almost always means a problem with the device, the media or the data set itself.

What is the difference between 30 and 90?

30 is a permanent error, usually physical. 90 is IBM's general code for an error that has no standard status, and you need the VSAM codes or system messages to explain it.

What should I collect before calling support?

The job log, the SYSLOG for the time of the error, the data-name-8 values for a VSAM file, and IDCAMS EXAMINE output for a KSDS.