Returns the name of the calling program.
This procedure returns the names of any procedure(s) that called it and displays the number of levels that the procedure was nested:
r-prgnm.p
r-trace.p
DEFINE VARIABLE ix AS INTEGER NO-UNDO INITIAL 2. DEFINE VARIABLE plist AS CHARACTER NO-UNDO FORMAT "x(70)". FORM plist WITH FRAME what-prog OVERLAY ROW 10 CENTERED 5 DOWN NO-LABELS TITLE " Program Trace ". /* ix = 2, so skip the current routine: PROGRAM-NAME(1) */ DO WHILE PROGRAM-NAME(ix) <> ?: IF ix = 2 THEN plist = "Currently in : " + PROGRAM-NAME(ix). ELSE plist = "Which was called by: " + PROGRAM-NAME(ix). ix = ix + 1. DISPLAY plist WITH FRAME what-prog. DOWN WITH FRAME what-prog. END. PAUSE. HIDE FRAME what-prog. |
Where type is either ASSIGN, CREATE, DELETE, FIND, or WRITE.
Where class-file-name is the name of the class definition (.cls) file in which method-name is implemented.