BookmarkSubscribeRSS Feed
Emma_at_SAS
Lapis Lazuli | Level 10

I have patient data in Canada that has province, city, and the closest intersection and I want to get the postal code for each participant. I could not find any feature in proc geocode to find the postal codes with the information I have. I appreciate your help for this dataset and if you have an advise for data collection in the future (when participants do not like to report their exact address or postal code-My thought was I may ask to get the address for the closest store to their home so I can get an approximation for postal code using proc geocode). I appreciate your help. Thanks

2 REPLIES 2
Reeza
Super User
Why do you need postal codes?

If you have the nearest location you could pass that to proc GEOCODE to get the lat/long. You could then compare that to a file that had postal codes to find the nearest postal code. Unfortunately that postal code data is restricted, you need either the PCCF file from StatCan/Canada Post, or a different source (PCTF in Alberta). FYI - this is a data intensive calculation.
ballardw
Super User

I would be tempted to contact any billing or who ever tracks such items as I would expect that side of the system to have postal contact information.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 394 views
  • 0 likes
  • 3 in conversation