Hi Wayne,
No, I can not use SDF, I really need Tab delimited, which is not the same as SDF.
Right now I'm working on this my idea:
Read portions of file with FREAD() function. I'm trying 10000000 bytes right now. Modify string with strtran(), put it into file with strtofile(). Right now I'm writting this code. Will see, if it works.
>Since it appears you are also making the files... have you thought about using the SDF instead of delimiting with a tab?
>
>COPY TO Myfile.txt TYPE SDF
>
>
>>Hi everyone,
>>
>>I have a huge text file (~100 000 records with ~50-60 fields), Tab delimited. I need to remove all double quotations from this file.
>>
>>This is the algorithm, we used. It doesn't work on big files - we have an error: "String is too big to fit".
>>
>>What else could you suggest besides low-level functions?
>>
>>
>>lntxtfiles=adir(laTxtFiles, lcPattern)
>>
>>*--------------------------------------------------------------------------
>>* -- loop through the array and perform string transformations in each text file
>>*--------------------------------------------------------------------------
>>create cursor lcTempCursor ;
>> (WorkField M)
>>append blank
>>
>>for i=1 to lnTxtFiles
>> lcFileName=lcPath+laTxtFiles[i,1]
>> lcSendFileName = lcPath+ojc.CurState+'\'+left(laTxtFiles[i,1],4)+'.txt'
>> if file(lcSendFileName)
>> erase (lcSendFileName)
>> endif
>> append memo WorkField from (lcFileName) overwrite
>> if !empty(alltrim(WorkField))
>> replace WorkField with strtran(WorkField,'"','')
>> copy memo WorkField to (lcSendFileName)
>> endif
>>next
If it's not broken, fix it until it is.
My Blog