in reply to reading from a large file and writing to a file

It doesn't sound too hard. You want a function, call it getKeys(), to read from the small source files that reads a line at a time, splits() it on your delimiter into token keys, then calls another function, call it slurpData(), that reads in the appropriate data from the key file, and prints a line to the database, which can probably be left open.

So the main process just calls getKeys() as many times as necessary to cover all your sources.

  • Comment on Re: reading from a large file and writing to a file