Kbase P60726: How to list all components for all the Indexes using the 4gl?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/26/2006 |
|
Status: Verified
GOAL:
How to list all components for all the Indexes using the 4gl?
GOAL:
How to programmatically list information about the fields that are part of a particular index?
GOAL:
How to query the metaschema for index information using the 4gl?
GOAL:
How to list all components for all the Indexes using the ABL?
FACT(s) (Environment):
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
The following code shows how to programmatically list all the components (fields) for all the Indexes using the 4gl:
OUTPUT TO Indexall.txt.
FIND FIRST _db WHERE _db-local NO-ERROR.
IF NOT AVAILABLE (_db) THEN RETURN.
/* Loop over all tables */
FOR EACH _file OF _db:
/* Loop over all indexes */
FOR EACH _index OF _file:
PUT "Index: " _Index-name SKIP.
/* loop over key components of an index */
FOR EACH _index-field OF _index:
/* go get _field record */
FIND _field OF _index-field NO-ERROR.
IF AVAILABLE (_field) THEN
PUT " Key column: " _index-seq " "_field-name SKIP.
END.
/* blank line */
PUT "" SKIP.
END.
END.
OUTPUT CLOSE.