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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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