Creating a purge program. First make a past on a stat file that has cust# and date to select appropriate records to purge into a “to purge” array (INSERT “AR”).
Then, read through main file, using a locate on the array to determine if it was one selected. If so, delete it.
Issue is that the main file are from 1-5 records whose IDs begin with the cust#. This file does not have a date to be used for purging. The main file has almost 5M records. The “to purge” array has 50k-150k cust#s in it. The first pass to create the array from the stat file only takes 30 seconds even with 3M+ records. However, reading through the main file, using a LOCATE (“AR”) is really slow.
I would think that locating in the array would be faster than doing one pass on the main file and doing 4M+ reads on the stat file. So, I was wondering if anyone had a better idea that would speed up the process.
Universe v11.3.1.6022 running on AIX 7.2


