Files are accessed during compiling of Declare File (DCLF) commands when CL modules and programs are created so that variables can be declared for each field in the file.
If you have qualified the name of the file at compile time, the file must be in that library at run time. If you have used the library list at compile time, the file must be in a library on the library list at run time.