Question Called Program Name

Dear All, hope you all are doing well :)

This post is regarding creator external procedure (.P) of dynamic handles. We have multiple types of dynamic handles in progress and we can get its creator name with the help of INSTANTIATING-PROCEDURE attribute but only when creator .P is there in memory.

As per my so far understanding, we can use INSTANTIATING-PROCEDURE to get Program name that has created the dynamic handles BUT that Program has to be there in memory. For example:-

MAIN.P
Code:
RUN Business_Logic.P.

/* When control comes back here then we have some handles in memory but we cannot get its creator name that is Business_Logic.P  but at the same time if we run this Business_Logic.P  as PERSISTENT then we could be able to get that name because it’s available there in memory */

Business_Logic.P
Code:
/* created some handles here as per need and didn't remove */

I want to get the .P name of called program that has created the handle (and didn’t remove) from calling program when called program hasn't run as PERSISTENT.

Please share your valuable inputs on the same.

Regards,
 

Stefan

Well-Known Member
You can populate the private-data attribute on the handle to provide additional information.
Alternatively, if you are trying to track down memory leaks, the dynamic object monitor in the debugger can be very useful.
 
Thanks for the reply Stefan!!!

PRIVATE-DATA is not working and its value is blank for almost all dynamic objects.
I think, we would have to set it's value prior accessing it and also Private-data value will not give creator program name under which handle is being created.

Please suggest if there is some option to get the creator program name with the help of Initiating-Procedure.


Regards,
 
Last edited:

Stefan

Well-Known Member
You need to give private-data a meaningful value yourself. It is far from ideal, but all you have.
 
Sorry, I think I am not clear with the requirement. I am trying to explain it again:

Program A.P calls B.P and in B.P we have multiple handles which are not deleted properly when return comes back to A.P (calling program) so we have free handles in memory but we can’t find its creator procedure that is B.P (with the help of INSTANTIATING-PROCEDURE).

We are able to find this information if A.P runs B.P as PERSISTENT.

Please suggest if there is any way to get this information.

Regards!
 

Stefan

Well-Known Member
No there is not.

As I already stated, you will need to either manually fill the private-data with for example instantiating-procedure:procedure-name (or whatever) in b.p or (as also already stated), if you are only interested in tracking down leaks, you can use the dynamic object monitor of the debugger. You start tracking, execute your procdedures and then stop tracking - you can then view what has leaked.
 
Top