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

S002

Sequential data set I/O error (IEC036I)SYSTEM ABEND · CHECKED 2026-11-14
Checked against IBM documentation

A sequential data set (BSAM/QSAM) or direct data set creation hit an invalid record, block or DCB attribute; message IEC036I gives the return code.

QUICK ANSWER

A sequential data set (BSAM/QSAM) or direct data set creation hit an invalid record, block or DCB attribute; message IEC036I gives the return code.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. Variable-format record with a record descriptor word (RDW) length less than 4 or greater than the LRECL (return code 04, 18).
  2. A record or block longer than the block size, or too large for the track or 32,767-byte limit (return codes 08, 0C, 14).
  3. RECFM=F with BLKSIZE not equal to LRECL, or RECFM=FB with BLKSIZE not a multiple of LRECL (return code B0).
  4. READ against a DASD data set opened for output only, or WRITE against one opened for input only (return code 38).
  5. DCB parameters missing or wrong when creating a direct data set (return code 1C).

CHECKED 14 Nov 2026 IBM: 002 | z/OS 3.2.0 | IBM Documentation (z/OS MVS System Codes) · IEC036I | z/OS 3.2.0 | IBM Documentation (z/OS MVS System Messages)

TRY IT: BLOCK SIZE AND SPACE CALCULATOR ▸

MOST LIKELY

Variable-format record with a record descriptor word (RDW) length less than 4 or greater than the LRECL (return code 04, 18).

FIRST CHECK

Read message IEC036I in the job log and look up its return code.

TRY IT ▸

Block size and space calculator

What it means

Abend 002 occurs while the control program is processing a sequential data set with BSAM or QSAM, or creating a direct data set. It comes with message IEC036I, whose return code gives the reason.

Return codes 04 to 18 mostly concern invalid record or block lengths, while B0 concerns RECFM, LRECL and BLKSIZE combinations.

Typical causes

  • Variable-format record with a record descriptor word (RDW) length less than 4 or greater than the LRECL (return code 04, 18).
  • A record or block longer than the block size, or too large for the track or 32,767-byte limit (return codes 08, 0C, 14).
  • RECFM=F with BLKSIZE not equal to LRECL, or RECFM=FB with BLKSIZE not a multiple of LRECL (return code B0).
  • READ against a DASD data set opened for output only, or WRITE against one opened for input only (return code 38).
  • DCB parameters missing or wrong when creating a direct data set (return code 1C).

How to fix it

  1. Read message IEC036I in the job log and look up its return code.
  2. Correct the RECFM, LRECL and BLKSIZE so they agree; for concatenations, remember the largest BLKSIZE applies to all data sets.
  3. If the error recurs and the program is not in error, rerun with DCB=DIAGNS=TRACE on the DD statement and a GTF trace as IEC036I describes.
  4. Contact the IBM Support Center with the JCL and program listing if no fix is found.