NPRao
21st March 2003, 23:48
I have seen many postings on the Board who are confused with which particular object is currently being executed, from which VRC, debugger or normal mode etc.

Due to copyright and other issues I am not posting the solution but I would like to put forward the algorithm that someone can make it into a script.

To check if a session/script/library is Currently in Shared Memory, one can use the shell script - CODE: Show which session a user is running (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1936)

1. Get the calling program name using - prog.name$
2. Check if the calling program is a session or a 3-GL script.
3. if its a session, get the package, module, session code else go to step 7
4. set the correct package vrc tree based on the current package combination.
5. get the latest session's VRC using - vrc_search_session()
6. get the script linked to that session and go to step 9
7. if its a 3-GL, it starts with o<ppmmmmsssssssss>
8. get the package, module, script code
9. set the correct package vrc tree based on the current package combination.
10. get the latest script's VRC using - vrc_search_script()
11. Check if the SCM/RCS is ON/OFF for that VRC
12. if the SCM is on and the component is checked out then use the checkout VRCs.
13. The function search.path.object() will give the script object path in execution.
14. message("Object in execution is %s", object.path)


Place this code in a DLL. Whenever you like to verify the object in execution, just call the function which gives the executed object path in the message.

~Vamsi
22nd March 2003, 22:16
Thread moved from Code & Utilities forum. When someone develops a script or when Prashanth can post the code, it can make it back to the Code & Utilities forum.