The DSPPGM command can print a list of modules for a program. If you want an automated solution, the List ILE Program Information (QBNLPGMI) API 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.