I have 3 million records which have zip code as one of the entities. I need to validate whether they are valid zip codes are not.
I have the set of valid zip codes from sashelp.zipcode. Which is the best way to validate my data? Thanks in advance.
Depends on what you want. Do you want to mark a records a finding a match in the data set? Or that the Zipcode matches a state or city value that you have as well?
It will help if you show what you want to see for "valid" and "invalid" zip codes.
And are your zipcodes all 5 digit or do you have some Zip+4 codes?
I want to keep the zip code only if it is valid in my dataset by validating against the look up file. If a particular zip is invalid I need to have null in my dataset for that row.
it worked. Thanks.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.