File I/O errors

The I/O errors are automatically trapped by the generated COBOL program. Messages are printed to the system log, FJSYABE and SYSOUT. The FJSYSABE provides the most comprehensive description of the problem. The following information is included:

  • USER ABEND code (identifier number in the COBOL program)
  • FILE-STATUS Code as per COBOL Status Codes
  • Description of error as per COBOL manual
  • 0C7 intentionally caused or RC=16, depending if FSABECOB or FSABEC16 program is in use. (See ABEND= EASYTRAN/EZPARAMS option).

Common I/O errors:

  • Wrong LRECL
  • Wrong VSAM Key definition (Static I/O only)
  • No DD-name in the JCL
  • Wrong file organization (KSDS, ESDS, etc)
  • Wrong Record format (F/FB, V/VB, U)
  • Pointing to wrong files
  • Not enough disk space

Example:

 06/01/18  TIME: 25:19:72  COPYRIGHT (C), TRANSIOM SOFTWARE, INC.
 FSABEC16 - COBOL FILE I/O ABEND SUMMARY REPORT
 USER ABEND CODE ===>  3003
 PROGRAM NAME ======>  NONAME
 PROGRAM TYPE ======>  COBOL-3
 OPERATING SYS =====>  MVS
 DATE COMPILED =====>  01/06/18
 TIME COMPILED =====>  22.25
 ABEND MESSAGE =====>  FILE I/O ERROR, RETURN CODE=35 FILEIN
 MESSAGE DESCRIPTION:  PERMANENT I/O ERROR:
                       AN OPEN STATEMENT WITH THE INPUT, I-O, OR EXTEND
                       PHRASE WAS ATTEMPTED ON A NON-OPTIONAL FILE THAT
                       NOT PRESENT. HINT: CHECK JCL FOR MISSING DDNAME.
 *END OF ABEND SUMMARY*

In the above example, the DD-name for FILEIN was not coded in the JCL as suggested by the hint. The User abend code of 3003 can be located in the COBOL source to see the exact location at the time of error (i.e. MOVE 3003 TO WS-PENGI-RETURN).