Consider I have a module, and I have made some change to the module, (not a parameter change, but just a logic change). Now I have to update all the programs which uses this module. Without the help of any external tools or APIs is there any AS400 command similar to DSPPGMREF which will let me know where all these module is being used?
There should only be one program that uses it. If a module is to be used in multiple programs, bind it into a service program.
However, you can call the List ILE Program Information (QBNLPGMI) API in a loop passing in the name of a different program each time. It can list the modules in each program into a user space. You can check the list for a module name or write the list to a file. When all modules of all programs are in a file, you can query it for module names.
I run a job every night over my program libraries to build a list of modules just so I'll have them handy. I do the same for service programs.
Tom
Right Tom, Many companies use this API.. Many will have the utility developed..
As just to enter the module name or file name and to list all the modules and programms using it
I wrote a series of articles, starting with Module, Module, Who's Got My Module located at http://www.mcpressonline.com/programming/apis/the-api-corner-module-module-whos-got-my-module.html, almost five year ago now, which provides this capability. The full series is:
http://www.mcpressonline.com/programming/apis/the-api-corner-module-module-whos-got-my-module.html
http://www.mcpressonline.com/programming/apis/the-api-corner-finding-modules-in-a-srvpgm.html
http://www.mcpressonline.com/programming/apis/the-api-corner-finding-all-*srvpgms-on-the-system.html
http://www.mcpressonline.com/programming/apis/the-api-corner-take-advantage-of-open-list-apis.html
http://www.mcpressonline.com/programming/apis/the-api-corner-finding-modules-in-a-pgm.html
http://www.mcpressonline.com/programming/apis/the-api-corner-parallelism-with-open-list-apis.html
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 3  Replies