In general case it's not simple because the STRTRAN() could create match for the next one.
>You're right. Not hard to handle luckily.
>Cetin
>
>>Your code will miss some occurences that happens to be split between two sequential reads.
>>
>>>Why don't you use fread(), fwrite(). You might have lines over 8192.ie:
>>>
>>>#define MAXBUFFER 65536
>>>lhIn = FOPEN(lcFileIn)
>>>lhOut = FCREATE(lcFileOut)
>>>DO WHILE NOT FEOF(m.lhIn )
>>> fwrite(m.lhOut,strtran(fread(m.lhIn, MAXBUFFER),'AD00','BR77'),MAXBUFFER)
>>>ENDDO
>>>FCLOSE(m.lhIn)
>>>FCLOSE(m.lhOut)
>>>
--sb--