Feedback
Did this article resolve your question/issue?

   

Article

How to determine which class or object instantiated a Temp-Table or ProDataSet?

« Go Back

Information

 
TitleHow to determine which class or object instantiated a Temp-Table or ProDataSet?
URL NameP179452
Article Number000206677
EnvironmentProduct:OpenEdge
Version:10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
How to determine which class or object instantiated a Temp-Table or ProDataSet?

Is there an equivalent attribute for INSTANTIATING-PROCEDURE that applies to classes and/or objects?

In the following code the INSTANTIATING-PROCEDURE returns a valid handle:
// Test.p 
DEFINE TEMP-TABLE TT1
    FIELD TTcode AS INTEGER
    INDEX idx TTcode.
    
DEFINE VARIABLE hBuff AS HANDLE NO-UNDO.
CREATE BUFFER hBuff FOR TABLE TEMP-TABLE TT1:HANDLE.

MESSAGE hBuff:INSTANTIATING-PROCEDURE SKIP hBuff:NAME VIEW-AS ALERT-BOX.
tt1.png


When using the INSTANTIATING-PROCEDURE attribute with dynamic objects created in a class, the value returned is unknown ?:
// Test.cls
USING Progress.Lang.*.

BLOCK-LEVEL ON ERROR UNDO, THROW.

CLASS Test: 
    DEFINE TEMP-TABLE TT1
        FIELD TTcode AS INTEGER
        INDEX idx TTcode.
    
    DEFINE VARIABLE hBuff AS HANDLE NO-UNDO.

    CONSTRUCTOR PUBLIC Test (  ):
        SUPER ().
        CREATE BUFFER hBuff FOR TABLE TEMP-TABLE TT1:HANDLE.

        MESSAGE hBuff:INSTANTIATING-PROCEDURE skip hBuff:NAME view-as alert-box.  
    END CONSTRUCTOR.  
END CLASS.
tt2.png

 
Steps to Reproduce
Clarifying Information
Error Message
Defect NumberOPENEDGE-I-974
Enhancement Number
Cause
This is expected behavior.  There is currently no object-orientated equivalent to the INSTANTIATING-PROCEDURE attribute.
Resolution
None at this time.   An enhancement idea (OPENEDGE-I-974) has been submitted through the Progress Community requesting to implement an OOABL version of the INSTANTIATING-PROCEDURE attribute.  Please see:

https://openedge.ideas.aha.io/ideas/OPENEDGE-I-974
Workaround
Use 'DynObjects' logging to determine which procedure/class created the dynamic objects.  For example:

[21/11/24@16:43:15.007+0000] P-013036 T-010200 1 4GL -- Logging level set to = 4
[21/11/24@16:43:15.008+0000] P-013036 T-010200 1 4GL -- Log entry types activated: 4GLMessages,4GLTrace,DynObjects.*
[21/11/24@16:43:15.109+0000] P-013036 T-010200 3 4GL DYNOBJECTS     Created        Progress.Lang.Object    Handle:1006 (D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p @ 6) Test 
[21/11/24@16:43:15.109+0000] P-013036 T-010200 2 4GL 4GLTRACE       New Test [Main Block - D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p @ 6]
[21/11/24@16:43:15.109+0000] P-013036 T-010200 3 4GL DYNOBJECTS     Created        BUFFER                  Handle:1009 (Test Test @ 15) Table:TT1 Pool:<unnamed> FROM adecomm/_runcode.p
[21/11/24@16:43:15.109+0000] P-013036 T-010200 2 4GL 4GLMESSAGE     ? 
[21/11/24@16:43:15.109+0000] P-013036 T-010200 2 4GL 4GLMESSAGE     TT1
[21/11/24@16:43:15.109+0000] P-013036 T-010200 2 4GL 4GLMESSAGE     ** ABL Debug-Alert Stack Trace **
[21/11/24@16:43:15.109+0000] P-013036 T-010200 2 4GL 4GLMESSAGE     --> Test Test at line 17  (D:\OpenEdge\122\workspace\Proginov-01064187\Test.r)
[21/11/24@16:43:15.109+0000] P-013036 T-010200 2 4GL 4GLMESSAGE         D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p at line 6  (D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p)
[21/11/24@16:43:16.524+0000] P-013036 T-010200 3 4GL 4GLTRACE       Return from Test [Test]
[21/11/24@16:43:16.524+0000] P-013036 T-010200 2 4GL DYNOBJECTS     Deleted        BUFFER                  Handle:1009 (D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p @ 22) 
[21/11/24@16:43:16.524+0000] P-013036 T-010200 2 4GL DYNOBJECTS     Deleted        Progress.Lang.Object    Handle:1006 (D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p @ 22) Test
[21/11/24@16:43:16.524+0000] P-013036 T-010200 3 4GL DYNOBJECTS     Cached         Progress.Lang.Object    Handle:1006 (D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p @ 22) Test
[21/11/24@16:43:16.524+0000] P-013036 T-010200 3 4GL 4GLTRACE       Return from Main Block [D:\OpenEdge\122\workspace\.metadata\.plugins\com.openedge.pdt.project\temp.dir\RunClass-Test-3189817987334712491.p]
[21/11/24@16:43:16.540+0000] P-013036 T-010200 3 4GL DYNOBJECTS     Purged         Progress.Lang.Object    Handle:0 ( @ 0) Test
Notes
Last Modified Date11/25/2021 11:31 AM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.