I did this on a lot of very large files. I used a free-ware tool to split the larger files into multiple files under 2 gig, then processed the individual files.
John -----Original Message----- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of MB Software Solutions General Account Sent: Wednesday, November 06, 2013 11:35 AM To: profox@leafe.com Subject: Working with text files larger than 2GB (VFP9SP2) 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) I'm thinking of just throwing together some quick program up front to process the gigantic files into smaller ones that the program can consume normally as it used to do. TIA, --Mike [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com 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/0e5401cedb21$4738c6b0$d5aa5410$@shelbynet.com ** 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.