Nadya,
If you want to use COPY TO, try this:
COPY TO dsstemp.txt TYPE DELIMITED WITH "" WITH CHARACTER "~"
STRTOFILE(STRTRAN(FILETOSTR('dsstemp.txt'), '~', '|^'),'dsstemp.txt')
MODI FILE dsstemp.txt
No fll needed to transform. The DELIMITED WITH "" stops you from having quotes used to wrap text, and the WITH CHARACTER "~" uses that character instead of comma to separate fields (important since without quotes, embedded commas inside strings would confuse things -- I assume you don't have the ~ character in your text). Then the STRTRAN substitutes your two character for the ~.
>Hi everyone,
>
>VFP6.0 SP5
>
>I have a requirement to create a text file from our database, where delimiters would be |^ (two symbols) and char data would not have quotes. Files have ~250 fields and may be huge.
>
>I'm thinking about two possible approaches:
>1) Scan the file and process it manually (here is a subquestion: do it through textmerge or create chunk string and put this string into file)
>
>2) Use copy to command and process the file afterward (Need some fll to make this replacement).
>
>What do you think would be better? Does somebody have a similar experience and some benchmarking?
>
>Thanks a lot in advance.