Most of the time it is my curiosity, but there have been occasions, where I needed to know if a program calls a particular service program. It is easy to discover which service a programs call a service program, but what about the service programs that that those service programs calls? Now there is way to do that.
A new SQL Table function, PROGRAM_RESOLVED_ACTIVATIONS, has been added to IBM i as part of latest Technology Refreshes, IBM i 7.6 TR1 and IBM i 7.5 TR7.
PROGRAM_RESOLVED_ACTIVATIONS has five parameters:
- PROGRAM_LIBRARY: Library that contains the object
- PROGRAM_NAME: Name of the program or service program
- OBJECT_TYPE: *PGM if the object is a program, *SRVPGM if it is a service program
- DEFERRED_SERVICE_PROGRAMS: NO do not follow deferred activations, these are service programs that had *DEFER in the BNDSRVPGM parameter of the CRTPGM or CRTSRVPGM command. YES follow the deferred activations, this is the default
- IGNORE_ERRORS: NO if an error is found an error happens. YES a warning is returned; this is the default
I have only used the first three.



