← All errors

CPF

CPF4101 File not found in library

Most common cause

The library holding the file is not in the job's library list. It often happens in batch jobs, which start with the job description's library list rather than the interactive user's.

Other causes

  • An OVRDBF points to a file or library that does not exist.
  • The file was deleted, renamed or moved.
  • EXTFILE in the program holds a wrong name, or is not yet set when the OPEN runs.
  • The file was saved with storage freed (reason code 04): it has to be restored with RSTOBJ.

How to fix it

The message's second-level text gives a reason code: 01 the library does not exist, 02 the file does not exist in that library, 03 the file is not found in the library list. Check the job's library list (DSPJOB option 13, or the job log), find the file with WRKOBJ OBJ(*ALL/FILENAME) and add the library with ADDLIBLE or by fixing the job description. If there are overrides, look at them with DSPOVR.

Related errors