Hi Kevin,
You may recall that I recently posted a message on processing big
files (100 MB or more), where records in the files are end with "//".
My intuition was that I should process a record at a time, and you
suggested that I nest the read statement within a repeat loop that would
identify when the end of the file is reached. Your script fragment
looked like this.
open file tDatapath
repeat until it is eof
read from file tDataPath until "//"
put it into tProcessData
--either call a function, or for speed do the processing
--given the size of your file, do it here
end repeat
close file tDataPath
I put the following version of the script through a trial run in an
attempt to simply count the number of records in the file.
put 0 into counter
open file tDatapath for read
repeat until it is eof
read from file tDataPath until "//"
add 1 to counter
end repeat
close file tDataPath
put counter
The script ran for about three minutes, and then everything just
kind of stopped. The last statement was never executed. I'm wondering
what I did wrong. Is the variable "it" in the repeat loop supposed to
receive an end-of-file message?
Regards,
Greg
_________________________________________
Gregory Lypny
Associate Professor of Finance
Concordia University
_________________________________________
"Take chances, make mistakes!"
- Ms Frizzle, The Magic School Bus
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.