How, in arev 2.x, would I be able to tell what fields have
btree or xref on them?
I have a program that needs updating and some of the source
is missing so I need to rewrite it. In the (original which I did not work on) program it does a index.flush(filename,"") and later a btree.extract.
??
Have you tried !filename ? I've only worked with 3.1 so I'm not sure that this exists in 2.x versions. Also, is there a "listindex" command in the voc ?
G Brooks-
Try Typing
LISTINDEX filename
at TCL. This should give you a list of all indexed fields and their types (Btree, Xref, Relational.)
Mike Ruane
WinWin Solutions Inc.
First off, the way an Xref index is implemented is by first creating a symbolic field whose name ends in _XREF and then putting a btree index on that.
Programmatically, you can check several places. Some of the Arev tools check one place and others check elsewhere, which can be a source of frustration if indexes get out of kilter. Perhaps the easiest is to check the *INDEXES record of the !filename file, where "filename" is the name of the file you're interested in.
You can also check the record %FIELDS% in the dictionary. On field 3 of this record is a list of field names. On field 6 is a flag indicating if there is a btree index.
You can also check the field itself. If the field is indexed, it will have a 1 in field 26 of the dictionary. I think this one may have moved between Arev versions.
Victor,
As you may recall, _XREF was .XREF until 3.x AREV; this may, or may not make a difference if he sets it up manually.
You are correct, of course. For some reason I read 2.X as 3.X in the original post.