Is there any command or method to find, the Number of Programs that are created with a Specific Module? Using DSPPGM, we can find the modules used to create the Pgm. But is there any command or method to find out the No of Programs , that a specific module is being attached/bound?
Software/Hardware used:
ASKED:
January 25, 2006 12:22 AM
UPDATED:
November 25, 2009 2:46 PM
We use Hawkeye’s Pathfinder. I would think there are probably several packages that would provide that kind of cross reference data. And I wonder whether there are any OS400 system catalog files for members?
This might be a partial answer. Use the command DspPgmRef. The best way, in my experience, to use this command is this:
SBMJOB CMD(DSPPGMREF PGM(*ALL/*ALL) OUTPUT(*OUTFILE) OUTFILE(QGPL/PGMREF))
This will build the database file QGPL/PGMREF with all of the program references for all of the programs on your system. It will take quite a while to run. After it is finished, you can query the file for the service program name in the field WHFNAM. It does not list the modules but it does list the service programs where the module resides.
When the question is “How programs have this module bound into them?”, the correct answer ought to be “One.”
If a module is being bound into multiple programs, it should be created as a service program. It shouldn’t be bound into anything else.
Tom
If you are interested in learning how to find where the module is used, and get a taste of system APIs at the same time, you may want to check out a series of articles I wrote. From here look for the article entitled Module, Module, Who’s Got My Module. That article is the first of a series covering the topic.
Bruce Vining