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.