rlavigne wroteThanks Bob, it's a more elegant way to do it and keep everything in a single procedure.
Let's not forget a very important fact how Aware works and how to utilize it in the best way.
Let's say there are 1 Million records in this table and many users use this process. And let's suppose, each FIND, finds 100,000 records and your final found records are 300,000 that needs to be changed/updated.
If you do all that in ONE process, Aware is going to create a single CONTEXT and TRANSACTION in Server's memory to keep track of all changes for all 300,000 records read and 300,000 records changed. Once all the records are completed, THEN it will SAVE to DB and releases the memory of CONTEXT and Transaction. Imagine the amount of server memory consumed if multiplied by # of users.
NOW, if you break it into 3 processes (for 3 FINDs), you get to release each CONTEXT and TRANSACTION much sooner, save to DB and move to another smaller batch. This way each batch/process will hold on to less memory and resources than one single process.
So, how is ONE process is more elegant than writing code that distributes the work? 🙂