×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
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!
As an Amazon Associate we earn from qualifying purchases.