autoshuffle and COPY -- a cautionary tale...
Jay R. Ashworth
jra at baylink.com
Fri Mar 5 08:45:50 PST 2004
Got bit yesterday...
My esteemed, but fairly weird, predecessor on an account wrote a bunch
of code that copies the entire work order header to a matching
temporary file, does all the calculations, and then copies the record
back in to the header.
It does this by using the COPY command.
I changed one of the files (using autoshuf, though that's not really
germane), and everything blew to hell the next morning: invoices (new
and reprint) were duplicating the parts total into freight, discounts
were appearing out of nowhere; wacky hijinks, basically, ensued.
Took me almost *three hours* to figure out that the problem is that
COPY copies on an ordinal field basis, skipping undefined fields. If
you have matched files, and you add fields in the middle of one, MAKE
SURE you add them to the other.
Cheers,
-- jra
--
Jay R. Ashworth jra at baylink.com
Member of the Technical Staff Baylink RFC 2100
The Suncoast Freenet The Things I Think
Tampa Bay, Florida http://baylink.pitas.com +1 727 647 1274
"They had engineers in my day, too." -- Perry Vance Nelson
More information about the Filepro-list
mailing list