|
This can get complex since you are asking about a Call Stack, not an--
invocation stack as in the old days. You can have PGM1 -> proc1 ->
proc2 -> PGMB -> procb -> PGMC
... and your call to QWVRCSTK will show all of those entries (plus
whatever called PGM1), not just PGM1, PGMB, PGMC. It can get complex.
Maybe my showCallStack() procedure will help you out in deciphering.
Code is at http://code.midrange.com/9c4486e042.html
Just incorporate that code into PGMC (copy, or place into module or
service program, or ...) and then add:
dummyvar = showCallStack();
into your code in PGMC where you want to show the name of PGMA... and
then examine (via debug or whatever) the result in dummyvar. (You
will, of course, have to define dummyvar. And you might want to step
through the code to see how it achieves this goal.)
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"There is a theory which states that if ever anyone discovers exactly
what the Universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarrely inexplicable.
There is another theory which states that this has already happened."
-- The Hitchhiker's Guide to the Galaxy
Seems like this should be easy. I want the name of the program that
called the program that called the program with QWRCSTK. IOW, PGMA
calls PGMB which calls PGMC which calls QWRCSTK. I want to get the
name PGMA. Which stack entry would it be? Is it backwards from where
I am? I cribbed the code...lots of examples, but I'm not getting this right.
TIA!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.
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.