Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

S001

I/O error (IEC020I)SYSTEM ABEND · CHECKED 2026-11-14
Checked against IBM documentation

An I/O error or simulated I/O error ended the task; message IEC020I gives a return code that identifies the problem.

QUICK ANSWER

An I/O error or simulated I/O error ended the task; message IEC020I gives a return code that identifies the problem.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. LRECL or BLKSIZE in the DCB, DCBE or DD statement differs from the data set (rc 0).
  2. An I/O error with no SYNAD exit specified (rc 1).
  3. A write to a data set opened for input, or a read from one opened for output (rc 1, BSAM/BPAM).
  4. A concatenated data set has attributes different from the first one (rc 1).
  5. A GET issued after end of file (rc 5, QSAM).

CHECKED 14 Nov 2026 IBM: IEC020I - z/OS 3.2.0 MVS System Messages

TRY IT: BLOCK SIZE AND SPACE CALCULATOR ▸

MOST LIKELY

LRECL or BLKSIZE in the DCB, DCBE or DD statement differs from the data set (rc 0).

FIRST CHECK

Specify a SYNAD routine in the DCB or DCBE if the program is to handle I/O errors.

TRY IT ▸

Block size and space calculator

What it means

Abend 001 is issued for the current task because of an I/O error or simulated I/O error, and message IEC020I carries the return code (rc) that explains it.

Return code 0 means the record length and block size in the DCB, DCBE or DD statement differ from those of the data set; 1 means an I/O error with no SYNAD exit; 4 (QSAM) means EROPT is ABE or invalid and/or no SYNAD exit was given; 5 (QSAM) means a GET was issued after end of file.

Typical causes

  • LRECL or BLKSIZE in the DCB, DCBE or DD statement differs from the data set (rc 0).
  • An I/O error with no SYNAD exit specified (rc 1).
  • A write to a data set opened for input, or a read from one opened for output (rc 1, BSAM/BPAM).
  • A concatenated data set has attributes different from the first one (rc 1).
  • A GET issued after end of file (rc 5, QSAM).

How to fix it

  1. Specify a SYNAD routine in the DCB or DCBE if the program is to handle I/O errors.
  2. Correct EROPT in the DCB (ACC or SKP may be chosen).
  3. Make sure the program does not issue GET after end of data.
  4. Correct LRECL and/or BLKSIZE in the DCB or DD statement.
  5. For a hardware error, see the accompanying IEA000I message.