Hi Peter,
The problem is ALINES() limit to 65000 elements ( VFP9 resolve it ? ) !
But with a little work is possible split the file,
process the parts and merge the results
------
do while not feof( lnHR )
lcC = fgets( lnHR )
lnFieldsFound = alines( laField, lcC, chr(9) )
for ln = 1 to lnFieldsFound
* manipulate laField[ ln ]
next
enddo
------
the natural solution is with APPEND FROM TEXT_TAB, but it not support memo and then with long strings is need a low level file manipulations.
however, if you want speed
- use m. prefix for read a variable
- donnot use unnecessary temporary variable
( especially if they are stringhe much long )
do while !feof( m.lnHR )
for ln = 1 to ALINES( laField, fgets( m.lnHR ), chr(9) )
next
enddo
if is sure that FSIZE(m.lnHR) is limited to 16MB and max lines limited to 65000, try:
FOR j=1 TO ALINES(aRows,FILETOSTR(filename))
for ln = 1 to ALINES( laField, aRows[ m.j ], chr(9) )
next
NEXT
Fabio