As Lizette said, there is no tracking mechanism in the system for dynamically called subroutines.
To track "obsolete" programs requires a good source maintenance system or adjunct product that cross references programs and who calls them and what programs are referenced in what JCL/PROC. Then you need to match the jobs for which you have source with some record of what jobs actually run (e.g. CAView or some other listing archive system). If you maintain 24 months of production job listings you can then tell what main programs ran and therefore what subroutines are still "live" (or at least possible to be live, actual CALL's of course are not tracked).
AFAIK no single product does all of this, you need to cobble together the pieces yourself and add scripting and sorts to organize and refine the data.
Bottom line is that the best you can do is to know is what MAIN programs were run and are still running (depending on how long your listing archive stores production batch listings). Called modules you have to ASSUME *might* have been called if they can be called by the main program or any of its direct subroutines.
The XREF product from DCMS, Inc. is an excellent, well maintained and affordable adjunct product if your source maintenance system doesn't do enough of the job.
Other vendors (including IBM) market "inventory" packages which can do some of this job. AFAIK none of them does all of the job.
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Lizette Koehler
Sent: Wednesday, December 20, 2017 9:59 AM
Subject: Re: Tracking load module reference COBOL
Do you have a source management tool? Either Change man or Endevor or ?? These tools can produce what it knows about.
Main modules are contained in SMF Records, so you can List what you are/have run. It cannot tell if it has not been run
Called programs/Sub Programs, as far as I know, are not tracked. Some shops have a standard where either they have a user smf record to do that, or have a requirement that all Cobol functions produce some sort of tracking function.
Do you keep at least 24 months' worth of SMF Data?
I am not aware of any process that can do what you are looking for without prepping your environment for this type of question.
Behalf Of Peter
Sent: Wednesday, December 20, 2017 6:40 AM
Subject: Tracking load module reference COBOL
I understand that SMF 42 can give us the load module used timeframe.
We have a cobol with main module and sub program.
Is there a way to track the main module and sub program which were used in
last 2 years ?
This exercise is to remove any dead program we have.
Any pointers would help me to research further.
This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN