You could use the AS/400 command DSPPGMREF which can create a datafile that you can query/view/search.
<b>DSPPGMREF PGM(KLMLIB/*ALL) OUTPUT(*OUTFILE) OBJTYPE(*ALL) OUTFILE(KLMLIB/PGMREF)</b>
This command will review <i>ALL OBJECTS </i>in library <i>KLMLIB</i>, it will put the output in a <i>OUTFILE</i> called <i>PGMREF</i> in library <i>KLMLIB</i>.
The file will contain data elements such as <i>Program Name, Description, Used Object, Object Type</i>, plus more.
Plenty of off the shelf tools.
The best one I have used is Hawkeye.
There is no AS400 Command.
You could write your own, using CL, and RPG.
QRPGLESRC etc, is a physical file you can read through each member looking from position 6 for ‘F’ and Position 7 – to 16, for a match on the file name.
Hawkeye will let you identify where more than files are used, *CMD, *PGM etc.
It also lets you xplode and implode jobs.
A basic limitation is that you can have multiple copies of the same file in different libraries. The one actually used by the program is the first one found in the library list at execution time.