>>I greatly appreciate your response. But speed is kind of important, and I have found a single-pass solution (courtesy of this forum but I cannot locate the person's name to give him credit).
>>
>>It is as follows:
>> lparameters t_cTablename
>>
>> use (t_cTablename)
>> handle=fcreate("dumped.txt")
>> scan
>> =fputs(handle,dumprecord())
>> endscan
>> =fclose(handle)
>>
>> function dumprecord
>> thisline = ""
>> for ix = 1 to fcount()
>> do case
>> case type(field(ix))$"CM"
>> newline = alltrim(eval(field(ix)))
>> case type(field(ix))$"NFYB"
>> newline = alltrim(str(eval(field(ix))))
>> case type(field(ix))$"L"
>> newline = iif(eval(field(ix)),"True","False")
>> case type(field(ix))="D"
>> newline = dtoc(eval(field(ix)))
>> case type(field(ix))="T"
>> newline = ttoc(eval(field(ix)))
>> otherwise
>> newline = ""
>> endcase
>> thisline=thisline+"~"+newline
>> endfor
>> return thisline
>>
>>Again, many thanks!
>>
>>
>>>Bob,
>>>
>>>use the COPY TO clauses as suggested here to create a temp version, but since you are dealing with so many records I think you'll run into memory problems trying to chrtran() the whole file at once. So do it one line at a time:
>>>
>>>
copy to temp.txt delimited ~
>>>create table temp2 cline c(254)
>>>append from temp.txt type sdf
>>>set textmerge to TheRealFile.TXT
>>>set textmerge on
>>>scan
>>> \<<chrtran( cLine, ["], '' )>>
>>>endscan
>>>set textmerge off
>>>set textmerge to
>>>
>>>>If I do [SELECT ALLTRIM(STR(number)) TO FILE ascii.txt] I get leading blanks in the output for records where the length of the data is less than the maximum length. I need output data with no leading or trailing blanks. Any ideas?
>Why my reply bounced back to me ?
>Cetin
Ooops. Sorry destination was not me.
Cetin