MainframeMaster

COBOL file status codes lookup

Paste a two-character file status (or search by keyword) and get the IBM meaning, typical causes, and a short recovery checklist. Built for Enterprise COBOL on z/OS - QSAM and VSAM.

How to use it

  1. Type the status from your DISPLAY or dump - for example 35 or 97.
  2. Or search words like duplicate key, missing DD, or IEC141I.
  3. Read the checklist and follow the related codes if you need a nearby status.

COBOL file status lookup

00

Successful completion

The I/O request finished normally. No further information.

successSuccessful completion

IBM meaning

Successful completion. High-order digit 0, low-order digit 0 — no further information.

Typical operations

OPEN, CLOSE, READ, WRITE, REWRITE, DELETE, START

Applies to

all

Typical causes

  • Normal path after a successful file statement.

What to check next

  1. Continue processing.
  2. Still check status after every later I/O — do not assume the next call succeeds.
Related:

Need this at work?

Free account saves tutorial progress. The jobs board lists openings that ask for JCL.

How file status works

Name a two-character field on FILE STATUS IS. COBOL updates it before AT END, INVALID KEY, or an EXCEPTION/ERROR declarative runs. You do not reset it yourself.

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SELECT CUSTOMER-FILE ASSIGN TO CUSTFILE ORGANIZATION IS INDEXED ACCESS MODE IS DYNAMIC RECORD KEY IS CUST-KEY FILE STATUS IS FS-CODE VSAM-CODE. WORKING-STORAGE SECTION. 01 FS-CODE PIC XX. 88 FS-OK VALUE "00" "97". 88 FS-EOF VALUE "10". 88 FS-NOT-FOUND VALUE "23". 01 VSAM-CODE. 05 VSAM-RETURN PIC S9(4) COMP-5. 05 VSAM-FUNCTION PIC S9(4) COMP-5. 05 VSAM-FEEDBACK PIC S9(4) COMP-5.

Status categories (first digit)

  • 0 - Successful completion (including informational success like 02, 04, 05, 07)
  • 1 - At-end condition (10, 14)
  • 2 - Invalid key (21–24)
  • 3 - Permanent error (30, 34, 35, 37–39)
  • 4 - Logic error (41–49)
  • 9 - Implementor-defined (90–98); dig into VSAM feedback / IEC text

Explain it like I'm 5

Every time your program talks to a file, COBOL leaves a two-letter note in your pocket. “00” means “all good.” “10” means “no more pages in the book.” “35” means “I cannot find that book on the shelf.” “97” means “I found the book, but the last reader left it open - I checked it and it is fine.” Always look at the note before you keep going.

All codes in this tool

33 Enterprise COBOL statuses covered in the lookup above.

000204050710142122232430343537383941424344464748499091929395969798

Related Pages

FAQ

Sources

Meanings follow IBM Enterprise COBOL for z/OS Language Reference (file status key table) and Programming Guide notes on VSAM status codes / VSAMOPENFS. Message IDs such as IEC141I and IEC161I are the usual JES companions shops see next to these statuses - always confirm against your release's IBM message library.