Try this (modified from Cetin code) for testing if the replaced string is being split during FREADs:
#DEFINE MAXBUFFER 65536
lhIn = FOPEN(lcFileIn)
lhOut = FCREATE(lcFileOut)
DO WHILE NOT FEOF(m.lhIn )
lcBuffer = FREAD(m.lhIn, MAXBUFFER)
DO CASE
CASE RIGHT(lcBuffer,3) = 'AD0'
FSEEK(m.lhIn, -3, 1)
lcBuffer = LEFT(lcBuffer,LEN(lcBuffer)-3)
CASE RIGHT(lcBuffer,2) = 'AD'
FSEEK(m.lhIn, -2, 1)
lcBuffer = LEFT(lcBuffer,LEN(lcBuffer)-2)
CASE RIGHT(lcBuffer,1) = 'A'
FSEEK(m.lhIn, -1, 1)
lcBuffer = LEFT(lcBuffer,LEN(lcBuffer)-1)
ENDCASE
FWRITE(m.lhOut,STRTRAN(lcBuffer,'AD00','BR77'),MAXBUFFER)
ENDDO
FCLOSE(m.lhIn)
FCLOSE(m.lhOut)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only