Consultor Eletrônico



Kbase P59886: How to get the information about LOB from the metaschema?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/11/2010
Status: Unverified

GOAL:

How to get the information about LOB from the metaschema?

GOAL:

How to get LOB information using 4GL?

GOAL:

Where are the attributes for BLOB and CLOB fields stored?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

FIX:

The following 4GL codes reads the metaschema tables and shows the same information displayed for properties fields on the data dictionary for BLOB and CLOB fields:

/* Sample 1 */
FOR EACH _file NO-LOCK:
DISPLAY _file-name.
FOR EACH _field OF _file
WHERE _Data-Type = "blob" OR _Data-Type = "clob" NO-LOCK:
FIND FIRST _storageobject
WHERE _object-type = 3
AND _object-number = _fld-stlen NO-LOCK.
FIND FIRST _area
WHERE _area._area-number = _storageObject._area-number NO-LOCK.
DISPLAY _Data-Type
_field-name
_area-name
_fld-Misc2[1]
_Order
_Fld-case
_Charset
_Collation
_Attributes1 WITH 2 COLUMNS.
END.
END.


/* Sample 2 */
FOR EACH _storageobject WHERE _storageobject._object-type = 3 NO-LOCK:
FIND _file WHERE _file-num = _storageobject._object-associate NO-LOCK.
FIND _field OF _file WHERE _fld-stlen = _storageobject._object-number NO-LOCK.

DISPLAY _file._file-name
_field._field-name
_storageobject._object-number
_storageobject._area-number.
END.