Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
I've switched from using the Get Call Stack API to using the classic Snd/Rcv message APIs for my getCallerPgmName() function in COZTOOLS.
I had to switch because I was finding that the callstack API wasn't always returning a value--or in some cases was returning blanks. This was observed during web/CGI program processing. Normally this can be expected if the pgm was recreated or is locked by a SAVxxx command; but I'm being told that is not the case here.
The only shortcoming to using the Snd/Rcv msg APIs is that you don't get the library name of the caller, which is returned by the callstack API.
Does your classic way work across activation group boundaries? Just asking.
Chris Ringer
Yes. Even the other way (calling the API) would work across A/G groups.