I know from experience that doing a REPLACE f1 WITH v1, f2 WITH v2, etc is way faster than individual REPLACE commands for each field. Perhaps the function calls in the value expression is bogging it down. Have you tried my suggestion inside the scan loop instead of using REPLACE ALL? Might be worth a try.
For further tips on optimizing VFP code, follow this link
http://www.rcs-solutions.com/blog/2007/10/23/OptimizingVFPCode.aspxA better tool to analyze and display the coverage log could be found here,
http://gorila.netlab.cz/cvp.htmlMike
>Your replace all suggestion actually made things much much worse. Slowed it down to a crawl. I let it run for 10 minutes before killing it.
>
>Just thought I would let you know the outcome.
>
>If your interested I could email you the coverage logs.
>
>Thanks for your help.