Having a little play with the LLIO stuff in VFP2C, Mike, and it looks like it
can handle files over 2GB which is not a real surprise since this library is a
wrapper around the Windows API.
The file I tried this with is ~2.7GB. It took about 5 minutes to go through the
file. FGetsEX returns data from the current position in the file up to the
first CRLF or the number of bytes in the 2nd param. Obviously I'm not doing
anything with the output other than moving the pointer.
ACTIVATE SCREEN
CLEAR
SET ESCAPE ON
IF NOT [vfp2c]$LOWER(SET("Library"))
SET LIBRARY TO c:\rfc\vfp2c32.fll
ENDIF
@ 3,5 SAY DATETIME()
@ 4,5 SAY GETFILESIZE([c:\rfc\temp\bigfiles\giantfile.log])
m.nh=FOPENEX([c:\rfc\temp\bigfiles\giantfile.log])
m.lnI=0
IF m.nh>0
DO WHILE NOT FEofEX(m.nh)
FGetsEX(m.nh,8192)
m.lni = m.lni + 1
IF MOD(m.lni,10000)=0
@ 5,5 SAY TRANSFORM(m.lni)
ENDIF
ENDDO
?FCloseEX(m.nh)
@ 7,5 SAY DATETIME()
ENDIF
--
rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Richard Kaye
Sent: Wednesday, November 06, 2013 1:56 PM
To: [email protected]
Subject: RE: Working with text files larger than 2GB (VFP9SP2)
Check out the VFP2C32 VFPX project. It has LLIO functions that may work with
larger files than VFP can handle natively.
--
rk
_______________________________________________
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/DF1EEF11E586A64FB54A97F22A8BD044228EE8EE28@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.