General information
Category:
Coding, syntax & commands
Hi Amanda,
This is a little hard to follow, but I'll do my best. The problem with large files is with fSEEK() and FEOF(). FSEEK(m.fhand,0,2) returns the present position if the file is over the 2GB limit. So, just after opening, the present position is 0. This is what you are seeing. FEOF() also returns .t. when record pointer is at 0 (or whereever it is) for large files. FREAD() seems to work correctly by moving the pointer and returning the string from the file. After the pointer moves, FSEEK(m.fHand,0,1) returns the correct position. However, each time FREAD() moves the pointer, FSEEK(m.fHand,0,2) erroneously returns the current position. (same value as FSEEK(m.fHand,0,1)) IOW, FSEEK(m.fHand,0,2) changes each time the record pointer is moved. FSEEK(m.fHand,n,0 or 1) seems to correctly move the pointer also.
The big problem is finding the end of the file, since FEOF() does not work with large files.
In the past, I've just used file splitter utilities (I think I sent you one) to break the files up into manageable sizes. This gives complete control, but ads another step. Alternatively, it may work to read the OS filesize and use that for FEOF().
Really testing these large files takes quite a bit of time, but I think this is all correct. Let me know if your findings are not consistent.
Thanks
Chris
Previous
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