Relational Index re-build problem (AREV Specific)
At 05 SEP 2000 04:29:20PM Lee M. Harwell email: [email protected] wrote:
I am having difficulty with Relational Idexes and need some guidance. I am running Arev version 2.11 and have a textbook example of a simple Customer file which is related to an Invoice file and Order file. It has worked fine until recently an employee accidentally deleted one of the customer records. I re-entered the same customer and then needed to rebuild the relational index so that the other files would be properly related.
I tried to ?rebuild? the relational index (chosen from the Update Index Menu). But the relational index did not order them (TOP) as I needed.I deleted the relational index by going into the Relational Index profile and changing the Indexing ON (Y/N) to N. After the index was deleted, I then recreated the same index, once again asking it to use a (TOP) sort mode. The end result was an index in no discernable order.What steps am I missing to be able to successfully build the Relational index in a sort order of my choosing?
At 06 SEP 2000 02:32PM Don Miller - C3 Inc. wrote:
Lee:
I think that this was a problem that got fixed in AREV v2.12. AREV sometimes absolutely refuses to use the BOT or TOP parameter. I have done the following in order to get it to happen properly SOMETIMES:
1. Clear out the indexing field(s) in the destination record by turning relational indexing off. This will remove the dictionary flag for the fields and allow you to modify them yourself, either with an editor or with R/BASIC code. Typically, I do an R/BASIC select and null out the field(s).
2. Your problem is that you need to have your indexes ordered with the "most recent" data at the TOP of the index. This is extremely difficult to rebuild since it is maintained in the order that the corresponding data records are written. If your source records are inherently in numeric, sorted order then you can store the data in descending order (with the largest value at the top). Otherwise, you will have to find some way to determine the order in which the source records were written.
3. After clearing the data fields put relational indexing back on with the TOP option.
4. If there is a post-date in the source file for these records, then you can sort your source file in descending post-date order or some other way which orders the data and write junk data into a don't care field. Anything that will cause the record to change. This will cause the relational index to be rebuilt (hopefully).
Maybe you'll get lucky.
Don Miller
C3 Inc.