The macro you made is great for small instances, but I had nearly 300 records.
I asked my son about this this afternoon, and he sent me a shell script that starts like this, and repeats to Wyoming:
cat $1 | sed
-e s'/American Samoa/AS/'
-e s'/Arizona/AZ/' \
...with instructions on running it from the Terminal. It did great, so I have something that works for future needs. But it would be so much nicer to just do it from the Finder with Keyboard Maestro.
He's not very familiar with Keyboard Maestro, but thought I might have AppleScript call the script. However, looking at the the "Execute a Shell Script" action, perhaps KM can run it directly. As you said, it would probably have to work on a closed file (selected file in the Finder).