Midrange News for the IBM i Community


Posted by: Bob Cozzi
Rogue Programmer
Cozzi Productions, Inc.
Chicagoland
Find my Caller PGM name
has no ratings.
Published: 24 Mar 2013
Revised: 25 Mar 2013 - 1969 days ago
Last viewed on: 14 Aug 2018 (3686 views) 

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.

Find my Caller PGM name Published by: Bob Cozzi on 24 Mar 2013 view comments(3)

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.

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS