The DSPPGM command can print a list of modules for a program. If you want an automated solution, the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/qbnlpgmi.htm”>List ILE Program Information (QBNLPGMI) API</a> will return a list of modules when you request format PGML0100.
If your module is in a service program, then DSPPGMREF can list service programs that are referenced by a program. The list can be to an outfile. If a module is going to be in more than one program, then it probably should be in a service program.