how to search for NON ASCII data so i can delete it- Thanks for all the help

oldtony tony at ynotsoftware.com
Mon Jan 21 12:07:58 PST 2019


Hi experts - thanks for all the help. Using Brian White's suggestions 
here is what worked for me.

thanks - old tony

   1 ::''prc.DelWierdStuff in file stock:
   2 ::''this prc goes through every field of each selected record and 
deletes records:
   3 ::''that have garbage, ie, not between ascii 32 to ascii 126 :
   4 Start::  ':
   5 ::  yy(3,.0) = "1";  rn = @rn:
   6 ::  LOOKUP  - r=rn -n:
   7 :     NOT -:     GOTO EOJ:
   8 LOOP::  ':
   9 :     yy gt NUMFIELD(-):     GOTO EOJ:
  10 ::  xx = FIELDVAL(-,yy):
  11 ::      ''''errorbox"Fieldno & Value."<"|"&yy&"| " & FIELDVAL(-,yy):
  12 ::  xx = ""{xx{"" ; ur_l = LEN (xx) ; ur_p = "1" ; ur_o = "" 
'--URL-Encode:
  13 :      xx eq "":     yy=yy+"1";GOTO LOOP:
  14 ::  GOTO ure1:
  15 ure1:: '':
  16 ::'debug on:
  17 ::  ur_ic = MID (xx,ur_p,"1") ;ur_oc = ur_ic ;ur_d = ASC(ur_ic):
  18 :     ur_d ge "32" and ur_d le "126":     GOTO  ure_  ':
  19 ::  lookup ldel = ListOfDeletedStockWithWierdStuff  r=free -n:
  20 ::  ldel(1)=rn; ldel(2)=@td ' Rec No Deleted & date:
  21 ::  WRITE ldel :
  22 ::  DELETE:
  23 ::  yy = yy + "1"; GOTO LOOP:
  24 EOJ::  ':
  25 ::  END:
  26 ::''=========================================:
  27 ure_::  ':
  28 ::  ur_o = ur_o & ur_oc:
  29 :      ur_p lt ur_l:     ur_p = ur_p + "1" ; GOTO  ure1:
  30 ::  xx=ur_o; yy=yy + "1";GOTO LOOP:
  31 ::  ''=========================================:
  32 ::     ''     Position    inlen        inchr     inchr _dec outchr  
out:
  33 ::  DECLARE  ur_p(8,.0), ur_l(8,.0), ur_ic(1), ur_d(3,.0), ur_oc, ur_o:
  34 ::''=========================================:

-- 
tony at ynotsoftware.com
Tony Freehauf (Old Tony)
YNOT Software & PC Support
815.467.2179
YNOT sounds like "Why Not."
YNOT let us help you.



More information about the Filepro-list mailing list