I am attaching a cleaner log along with the options for the code to be printed in the log along with the input file used for the "Macro Doit". Please accept my apologies for not including all of the relevant information. My past questions and research in the community were much simpler in nature. There are two main datasets used in this process. One is a claims file (ip_clm_23q3.csv) that has the FIPS code on each record. The other dataset is the af22.csv which provides the provider (from the first file), a zip code, and the count of records that came from that zip code. Since we have a FIPS to Zip crosswalk (zip23fips_fmt) we can 'synthesize' a zip to the claim record based on that fips. We are using the distribution of the records by zip to assign that zip to the claim record so if you did a frequency from the area file and the claims file, you should get the same count overall. I do have both tables indexed on the relevant variables (provider, fips, zip, etc) but it sounds like sorting by those would be more efficient. The routine begins with provider 010001 and the total count of records. From that point we grab all of the FIPS codes associated with those records. In my exported log, I chose a facility with 100 records as opposed to one with thousands.
... View more