I have a large SAS dataset which I am trying to narrow down to specific counties in the US. The variables I have are: 'state_FIPS_code' and 'county_FIPS_code'. Each state has a unique FIPS code (e.g. California FIPS = 006, New York FIPS = 036). However, some counties can have the same FIPS code as other counties in another states (e.g. Autauga County, Alabama FIPS = 001, and Kent County, Delaware FIPS = 001).
So, in order to narrow down the dataset to the counties I need, I first thought of narrowing down the states, and then narrowing down the counties. The problem is however, unwanted counties would be included as well. For example, if I narrow it down to Florida, Alabama, and Texas, and then narrow down the county FIPS codes to 1, 3, and 5. Then it might include county #5 in Florida even though I only want the one in Texas.
I have been struggling with this issue for weeks and can't seem to figure it out. I'm trying to find the most efficient way to do this without having to write 500+ lines of code. Thank you in advance for your help.