Wellll...

Here's a process where named arrays (Hashes) would be wonderful. Each named element would contain a 2 element array - a flag indicating the status from group 1 and group 2. Once you create your hash, you just enumerate it to find the items with only one element defined. If the flag is in element 1, it needs to be added to group 2. If it is only in element 2, it needs to be deleted from group 1. The HASH only contains an index of what exists in each group - you need to use this to find the data to move from group 1 to group 2. You could put all the data into the hash, but that might make it more difficult to manage.

Howard Bullock has a HASH library - a collection of UDFs that might give you this feature. Something to look into.

You can test the logic with an INI file.. I have a situation where I need to gather data that might have many duplicates - I write each item as an element in a section of an ini file, then just enumerate that section to get a unique list. Sorting isn't important, but lack of dups is, although QSort would make quick work if I needed them sorted.

In another case, I need to track how many times object X exists in a log file, and gather 5 pieces of data about that object. Again, I use an INI file, this time with a separate section for each object, and the values of the section representing the data fields. I do a read/increment/write of the COUNT value to keep a running tally of how many times it occurred. Named arrays would be faster, but I typically have only 1-200 items in the first example, and generally less than 15,000 in the second. When processing a source file with 15,000 records, it completes on my P4-3000 in 30-40 seconds. (actually, I process 11 files ranging from 100 lines to 15,000 lines, and all 11 complete in 43 seconds. Have never timed a single file.)

You could try the INI method by having a section define the account name, a set of values that are read from the master, and a flag entry that indicates it exists in the target. Simply enumerate the INI file, and every time you read the flag entry and it comes up null, you know you need to read the rest of the values from that section and send them to the target environment.

Anyway, just some ideas.. the INI file method is easy to implement without complex coding or UDFs, and lets you look at the "array" by editing the file itself.

I can share a few code fragments if you want a head start on the INI method - just email me.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D