Get parent program name from child program

Posted by Admin on 31-Mar-2010 13:32

What I am trying to do?

Get the name of a program that originally called child program (which is .p program)

Scenario

I have a program called WebView.htm which calls GetData.p program. GetData.p needs to know which program it was called from. One way to do is to pass a program name explicitly as a parameter when calling GetData.p. But this raises a concern in my scenario because I have about 200 web pages that I would have to modify in order to add this new parameter. Is there another implict way (may be a Progress built-in module) that I could use to get the parent (i.e. caller) program name from within GetData.p program.

All Replies

Posted by Tim Kuehn on 31-Mar-2010 15:21

source-procedure will return a handle to last program that was called. It needs to be called immediately on entry to the current program before any other RUN statements are executed, or it'll lose the source program reference you're looking for.          

Posted by Admin on 31-Mar-2010 15:43

Thanks! Really appreciated. That solved my problem.

This thread is closed