Take and use at your own risk (StkTrc.zip). This is not sufficiently tested anywhere but under V5R1. Three source members: qclsrc.xrtnclrinf -- X-ReturnCallerInfo Can be compiled/used as *PGM or as bound proc. qclsrc.tstpstktrc -- Test calling stack trace as *PGM. qclsrc.tstcstktrc -- Test calling stack trace as bound procedure. Calling XRTNCLRINF returns four parm values: Lib -- Library of caller Pgm -- Program name of caller Mod -- Module containing calling procedure Prc -- Procedure name of caller An optional 5th parm is a logical variable: '1' -- Return values for calling *PGM '0' -- Return values for calling proc -- This is the default. May be called by OPM or ILE *PGMs.