5 pts.
 Logical Files error
We are receiving an error "File TQRYOUT in QGPL has logical files, cannot replace." which is preventing us from running some of our month-end queries. Please provide some suggestion as to what do we need to look at to correct this. Thank you

Software/Hardware used:
ASKED: April 14, 2010  4:00 PM
UPDATED: April 16, 2010  1:55 AM

Answer Wiki:
Assuming this file is generating during month-end processing by the execution of a standard OS/400 query, it sounds like the query output option is set to regenerate the entire file every time. You can change that so it simply replaces the contents within the file. Or you could add a simple CL program to run in front of the query that finds all of the logicals that reference this file and delete them. But then you'd have to recreate them (if they were needed) after the query has finished running. Your choice. ============================================================ To generate a list of dependent files, you might run this command:<pre> DSPDBR FILE( QGPL/TQRYOUT ) OUTPUT(*OUTFILE) OUTFILE( QTEMP/TQRYOUTLF )</pre> That would create a small file in QTEMP that could be read by a CL program. The dependent files could each be deleted with a DLTF command. If you simply want to see the list, use OUTPUT(*) instead. You might want to track down whatever (or whomever) is creating these. Tom
Last Wiki Answer Submitted:  April 16, 2010  1:55 am  by  Littlepd   1,130 pts.
All Answer Wiki Contributors:  Littlepd   1,130 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _