I'd agree with Fred. If you're exceeding VFP's capacities its functions will not be reliable (kinda like the thing you ran into the other day with using functions for setting sys memory settings). Check out the VFP2C32 VFPX project. It has LLIO functions that may work with larger files than VFP can handle natively.
-- rk -----Original Message----- From: ProfoxTech [mailto:[email protected]] On Behalf Of Fred Taylor Sent: Wednesday, November 06, 2013 1:49 PM To: [email protected] Subject: Re: Working with text files larger than 2GB (VFP9SP2) I've not tried to actually open and spin through a file larger than 2GB, but I don't think it will work. Once the internal 32 bit pointer exceeds it's limit, you're probably not going to retrieve the data you think you're getting as it will now be a negative number. YMMV Fred On Wed, Nov 6, 2013 at 11:35 AM, MB Software Solutions General Account < [email protected]> wrote: > A provider has decided to give us everything in 4 large behemouth > files now instead of by groups as they had in the past. This pushes > the text files for this parsing program beyond 2GB. I thought VFP > would choke immediately on them but it gets the handle just fine, and > I did a > FGETS(liHandle,550) and it read 550 characters just fine (or so it > looks like it). However, the FSEEK fails (returning 0). My initial > thought is "knowing the number of rows is nice but not > critical...let's just proceed to FGETS until we're at EOF." Your > thoughts? Here's the code below that opens the file and attempts to > get an idea of how big the file is and how many rows it has. lnLength is 550 > in this case. > > liHandle = FOPEN(this.InputFile) > liCnt = 0 > > * determine # of rows & count record types lnFileSize = > fseek(liHandle, 0, 2)&& get the file size =fseek(liHandle, 0, 0)&& > put the pointer back at the begining > * the +2 below is because of the CR/LF lnRows = ROUND(lnFileSize / > (lnLength + 2),0) _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD044228EE8ED4C@ACKBWDDQH1.artfact.local ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

