Kbase P122089: How to list all the components of the indexes of a Database?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/6/2007 |
|
Status: Unverified
GOAL:
How to list all the components of the indexes of a Database?
GOAL:
Sample procedure to list all the fields of all the indexes of a Database.
FIX:
The following code will list all the components for all the indexes.
output to theindexes.txt.
find first _db where _db-local.
/* 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.
put " Key column: " _Index-seq
" "_field-name skip.
end.
/* blank line */
put "" skip.
end.
end.
output close.