Simple Mainframe Universe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

VSAM Troubleshooting


File status 35 on OPEN INPUT

VSAM file status 35: Dataset not found on OPEN — the cluster is missing or the DD points at the wrong name.

What it means

  • Dataset not found on OPEN — the cluster is missing or the DD points at the wrong name.
  • Status 35 on OPEN INPUT/OUTPUT means the file is not where the program expects.

Common causes

  • DD DSN misspelled or wrong catalog.
  • Dataset deleted or never created.
  • GDG generation (0) empty — no generations exist.
  • Wrong volume or catalog searched.

How to diagnose

  • Verify the DSN in JCL against the catalog (LISTCAT).
  • Check for typos, especially GDG base vs generation.
  • Confirm the job runs with the right catalog search order.

How to fix it

  • Correct the DSN.
  • Create or restore the dataset.
  • For GDG, ensure a generation exists before the run.

Example: Always check FILE STATUS after I/O

READ CUSTFILE NEXT RECORD AT END MOVE 'Y' TO WS-EOF NOT INVALID KEY CONTINUE END-READ. IF WS-FS NOT = '00' DISPLAY 'File status: ' WS-FS END-IF.

FILE STATUS after every I/O turns mystery failures into clear codes.

Interview tip

  • Q: How would you troubleshoot a File status 35 on OPEN INPUT in production?
  • A: I would confirm the exact file status code, check the JCL DD and catalog, then apply the specific fix.

Prevention checklist

  • Check FILE STATUS after every OPEN/READ/WRITE.
  • Keep FD layouts in sync with cluster definitions.




© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant