|
Mark Walter wrote: > I've taken some utility programs and made them modules with > sub-procedures. > Then created a service program. A couple of the programs time-stamp the > database with the date time user and the program making the change. Now > that I've changed this, I get the Service program name. This service > program can be called from a number of different programs. I get the > program name from the system data structure, position 334-343. Is there > anywhere I can retrieve the program name that invokes this service program > from within the service program itself? > If you're at V5R1 you can use the new API to retrieve the program invocation stack. If not you can use the system built-in _MATINVS function to retrieve it. The easiest way (least complicated, not necessarily least work) would be to add a options(*nopass) parameter, where you can pass the program name to the service program routine.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.