You can retrieve the inside-sql for each query with a RTV* command (i’ve forgot the exact name, something like rtvqmqrysrc)
You can retrieve last date usage with a DSPOBJD output(*outfile)
You can’t retrieve all the file names that might be in or used by a Query/400 query without some special programming. The file names won’t necessarily be in the source generated from RTVQMQRY. This is just one of the many reasons Query/400 use should have been discontinued some 15 years ago.
See this ITKnowledgeExchange <a href=”http://itknowledgeexchange.techtarget.com/itanswers/rtvqryf-back-in-time/#comments”>thread on Query/400 files</a> for a helpful aid.