Problem with LEN() function -
10-22-2010
, 08:31 AM
Pdox 4.5 for DOS
I'm scanning a field formatted as A12, which contains UPC codes (all
digits). Any record with 10 characters or less is valid, and I simply want
to know how many records are like that. I aimed the code below at a test
copy of my table. When it was done, it RETAINED a lot of records which were
<11 chars. Checking some of those in field view, I see no hidden chars. What
might be causing this?
Incidentally, if I change the LEN() test to >10, it still doesn't function
correctly. This script is purely informational. I simply need to know how
many records (out of 18,000) need "treatment". If it's a dozen, I'll ignore
them. If it's "a lot", I'll take other action.
tname.a = "c:\\eval\\dump"
VIEW tname.a
MOVETO [UPC]
EDITKEY
SCAN
IF LEN([])<11
THEN
DEL
ENDIF
MESSAGE "Checking field length ",RECNO(), " of ", NRECORDS(tname.a)
CANVAS ON CANVAS OFF
ENDSCAN
DO_IT! |