Salesforce

How to find a Table Name with it's Area by its Table Number

« Go Back

Information

 
TitleHow to find a Table Name with it's Area by its Table Number
URL Name20139
Article Number000173334
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
How to a Relate Table Name with its Area
How to report on Table Names and numbers by Storage Area
How to identify a table name by a table number?
How to find the file number associated with a Table?
How to find the table name based on the table number reported in PROMON
Can I determine a table name from its table number in an error message?
How to find the table number needed for IDXFIX?
 
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Tables are stored in logical areas for a number of reasons including load balancing and better performance. In order to programmatically find out what Area a given Table is in, an ABL Query that joins the _area_StorageObject and _file metaschema tables can be used. 

The following ABL code example can be customized to requirement:
 
/* a list of storage areas and their associated tables: */

FOR EACH _storageobject WHERE _storageobject._object-type = 1
    AND _storageobject._Object-number GE 1 NO-LOCK
                            by _area-number
                            by _object-type:
FIND _File WHERE _File._File-Number = _storageobject._Object-number NO-LOCK NO-ERROR.
FIND _area WHERE _area._area-number = _storageobject._area-number  NO-LOCK NO-ERROR.
DISPLAY 
_File-Number FORMAT "->>9"  LABEL "T#"
_File-name FORMAT "x(25)" LABEL "Table"
_area._area-number FORMAT ">9" LABEL "A#"
_area._area-name FORMAT "X(25)" LABEL "Area" SKIP     .
END.

 
Workaround
Notes
Keyword Phrase
Last Modified Date4/11/2017 7:12 AM

Powered by