Delimiters in Key(s) (AREV Specific)
At 14 MAY 1999 07:47:03AM Barry Stevens wrote:
I suspect a client has @fm or @vm in some record keys.
Can anyone paste the code up here that gets rid of them.
Barry
At 14 MAY 1999 09:06AM Matt Sorrell wrote:
Barry,
I do something like the following to test for delims in record keys:
OPEN "" TO IN.FILE
CLEARSELECT
@REC.COUNT=0
EOF=0
SELECT IN.FILE
LOOP
READNEXT ID ELSE EOF=1
UNTIL EOF
FMIX=INDEX(ID,@FM,1)
VMIX=INDEX(ID,@VM,1)
SVMIX=INDEX(ID,@SVM,1)
IF FMIX OR VMIX OR SVMIX THEN
***do something here like delete or copy to another key value
END
REPEAT
STOP
You can obviously get fancier and more complex, but that should do it for you.
Matt Sorrell
At 15 MAY 1999 04:59AM Steve Smith wrote:
Place a DELIMKEY symbolic in DICT.VOC with formula=
RETURN INDEX(@ID,@FM,1) + INDEX(@ID,@SVM,1) + INDEX(@ID,@VM,1) …
Then at TCL (with your bad file called SUSPECT.FILE):
LIST SUSPECT.FILE WITH DELIMKEY ] 0
Should show the culprits (perhaps with keys split on different lines)
Then (in an AREV developer) at TCL on one line type:-
EVAL OPEN 'MYFILE' TO X THEN READ REC FROM X, "BAD":@FM:"KEY" THEN WRITE REC TO X, "GOODKEY"
Steve