READNEXT and BTREE.EXTRACT (AREV Specific)
At 13 AUG 2002 07:08:59PM ps wing wrote:
Hello all,
I have a program to check the consistancy of a BTREE index (as below) but it reports different ids missing each time I run it, but when run for just a missing id it finds it, as does a TCL select - any ideas?
OPEN "TRANS" TO F.TRANS ELSE STOP
OPEN "DICT.TRANS" TO D.TRANS ELSE STOP
SELECT F.TRANS
AGAIN:
READNEXT ID THEN
FUNDCODE=FIELD(ID,"*",3)
OPT=S":@FM:1 ; FOUND=0 ; FLAG=" ; IDS="
SEARCH=FUND":@VM:FUNDCODE:@FM
LOOP
BTREE.EXTRACT(SEARCH,"TRANS",D.TRANS,IDS,OPT,FLAG)LOCATE ID IN IDS SETTING POS THEN FOUND=1WHILE FLAG]0 AND FOUND=0REPEAT
IF FOUND ELSE MSG("NOT FOUND ":ID)
GO AGAIN
END
At 13 AUG 2002 08:37PM Warren wrote:
rebuild the indexes. Confirming first that the justification and field length is valid/proper for the data in question. Verify also that there are no 'control' characters in any of the record keys.