What it means
Before a program can read or write a data set, OPEN builds one set of attributes from three places. They are the program's DCB, the DD statement and the data set label. Values in the program win over the JCL, and the JCL wins over the label. OPEN then checks the result. If a check fails, OPEN issues message IEC141I and ends the step with system completion code 013.
The number after the dash is what matters. The ones you'll see most are these.
013-18means the DD statement named a member of a partitioned data set (PDS or PDSE), and the member isn't there. Usually it's a typo, the wrong library, or a member that hasn't been created yet.013-20means the block size doesn't fit the record length. For fixed-length records, BLKSIZE must be a whole multiple of LRECL. Coding BLKSIZE=800 with LRECL=133 fails this way.013-34means the record format, record length and block size don't make sense together. Typical cases are an LRECL larger than the BLKSIZE for fixed-length records, an LRECL of zero with no variable format, or no block size available from the program, the JCL or the label. It turns up most often on a new data set that was given only part of its DCB information.
For any other code, look it up under abend 013 in IBM's system codes manual.
Common causes
- The member named on the DD statement doesn't exist in that library (013-18). A symbol or PROC override that points at a different library has the same effect.
- The JCL codes DCB attributes for a new data set that don't fit together, such as a BLKSIZE that isn't a multiple of LRECL for RECFM=FB (013-20).
- A new output data set was given an incomplete or contradictory set of RECFM, LRECL and BLKSIZE values, for example an LRECL bigger than the BLKSIZE, or no LRECL at all from the JCL, the program or an SMS data class (013-34).
- An assembler program or utility sets RECFM, LRECL or BLKSIZE itself, and those values clash with the data set.
How to find the problem
- Find IEC141I in the job log. It looks like
IEC141I 013-18,IGG0191B,jobname,stepname,ddname,...,dsname(member). Note the reason code, the DD name and the data set name. - For 013-18, open the library in ISPF 3.4 and look for the member in the member list. Then check the substituted JCL in the job log (IEFC653I lines) to confirm the job really used that library and member name.
- For 013-20 or 013-34, collect the attributes from the DD statement (DCB, RECFM, LRECL, BLKSIZE, DATACLAS) and from the program's FD or DCB, then work out the merged values by hand.
How to fix it
- For 013-18, correct the member name or the library name, or create the member, then rerun the step.
- For 013-20, code BLKSIZE=0 or leave it out on new disk data sets, and let the system choose a block size that fits.
- For 013-34, give the new data set a complete, consistent set of RECFM and LRECL values on the DD statement, with BLKSIZE=0 or none at all, copy them from an existing data set with
LIKE=, or use an SMS data class that sets them. - Remove DCB overrides in the JCL that disagree with the data set or the program.
- In COBOL, keep RECORDING MODE and RECORD CONTAINS in line with the file. COBOL usually reports that kind of conflict as file status 39 rather than S013, so check the file status after every OPEN.
What it looks like
IEC141I 013-18,IGG0191B,PAYRUN01,STEP010,SYSIN,0A12,PRD101,PROD.PAYROLL.CNTL(PAYPRM07) IEA995I SYMPTOM DUMP OUTPUT SYSTEM COMPLETION CODE=013 REASON CODE=00000018 IEF450I PAYRUN01 STEP010 - ABEND=S013 U0000 REASON=00000018