Thanks I tried but no luck.
I think there is a problem in first do loop (and the fact that it isn't incorporating the while loop). It appears to be reading in the entire file and then dividing at the delimiters, which given such a huge file, it can't do. Any ideas on how to make the first loops to read in only a record at a time and then move on to the next record, without reading in the entire file?
Thanks Again!!
Apologies for not scrutinizing your program better earlier. Still, after looking at it, I am a bit puzzled as I thought your code "reads" a file, yet I don't see the filehandle for the input.
For reading a file line by line, the usual prescription is: