If you work on z / OS, you can accomplish this, but this is not trivial.
First you need to trace the chain of save areas and use CSVQUERY to find out which program belongs to each save area. Every other program will be a Cobol runtime module, such as IGZCPAC. In IMS, CICS, TSO, etc. These modules can be different. This is the easy part.
, , OS LOADER/BINDER/LINKER, , . .