[Home] [Puzzles & Projects] [Delphi Techniques] [Math Topics] [Library] [Utilities]Problem Description
Running/Exploring the Program
File Update is does text match-merge processing of a file of Update transactions against a Master file.
Each DFF newsletter that goes out results in 50 or so undeliverable. There is no automatic mechanism to remove these invalid email addresses from the subscriber list, so I spend an hour or two manually updating the list each time. I recently decided to automate this process. The final product will scan reject emails and extract the addresses to delete, but in Phase 1, this program, I drag the email addresses to a text file which the program sorts and passes against the subscriber list to delete matching records.
I've generalized the program to optionally add records which do not exist.
Note that the match "key" is the entire record which probably restricts the [program's usage to simple list of names or objects.
There are a surprising number of decisions to make when matching two files. Here are the options that ended up as radio button boxes in the program:
Additional options control:
Note for programmers:
There's a new experimental TSyncMemo class implemented here to synchronize the three TMemos used to display Master record, Update transactions, and Action taken. An arbitrary number of TMemos can be associated with a TSyncMemo. Only vertical scrolling is synchronized. It's not perfect, the "slave" TMemos can be scrolled independently even though no vertical scroll bars are specified, but it was quite simple to implement and works well enough for now. An enhanced version may show in Delphi Techniques one of these days
Files are loaded into TStringlists which are sorted using CustomSort to handle user case sensitivity option.
The program has not been extensively tested and is presented "as is" for your testing or modification. Always save output to a new file until you have verified its correctness.
Copyright © 2000-2013, Gary Darby
All rights reserved.