On 8/27/07, Tolkin, Steve <[EMAIL PROTECTED]> wrote:
> This can be easily extended to be a general purpose match/merge program.
> Suppose we call the two inputs A and B.  Each ID is in one of three
> possible cases, and so we want three subroutines, named e.g., just_in_a,
> just_in_b, and in_both.   (In the original example just_in_a would do
> the same thing as just_in_b, but that is not always desired.)

In the dark ages, this was called the Master File Update algorithm,
for merging the "yesterdays balances/inventory"  and "todays
transactions" punch-card decks to produce tonight's new
balances/inventory deck and an exception report (printer), with 2 card
readers, 1 card punch, 1 printer, and no online storage and precious
little RAM.

The Other, Other Michael Jackson did a very elegant workup of this algorithm.

> I am looking for perl code that does this, in a configurable way, e.g.
> let the user specify the ID column/s, sort the two inputs (if not
> already sorted), read them both, call the subs, etc.  Please send a link
> or the code itself.

My version assumes the sorted ID is in column 1, iirc. I was thinking
of just such an extension but haven't done it.
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to