[TriLUG] Yet another c++ question
mfreeze at gmail.com
Tue Nov 15 09:28:34 EST 2005
For those of you who have missed out on my odyssey I am currently
converting all of my file / database processing programs to c++ and
moving all of my systems to Linux. Well, 99% of them to Linux. I
still have to keep a couple Windows boxes to run my mailing & printing
Today's problem: All of my text processing programs split the
customers text files into several other text files. Some are converted
into dBase, some are converted into tab delimited files, and some are
imported directly into my mailing software.
These various files are then sometimes merged into other files, etc...
processed again, and then portions of them put back together and
prepared for printing.
Every record in each parent file is given a unique key upon initial
import to identify itself throughout the process. My printing programs
put all of this info back together using this key, much like a
relational database. The way that I have done this in VB is to have
the unique key consist of the date and time that the record is
processed, a sequential record number for that file, and a unique hex
record identifier that is pulled from the Windows registry,
incremented, and then put back. So, a record id may look like
11152005-1348-000001-3BA144. (Without the dashes.)
My question is this: What would be the best way on a Linux system to
keep track of this unique key identifier? Or is there a better way to
accomplish this task? I chose to write it to the Windows registry with
VB so it wouldn't get deleted from the disk, it was not easily
tampered with by users of the program, and really, it was just one
less file that I had to keep up with. Having the key off by even one
record could potentially catastrophic. I keep these files forever and
I process and print around 1 million statements per month.
Thanks again for the help!
More information about the TriLUG