About 400 results
Open links in new tab
  1. Solved: 5 digit zip code - SAS Support Communities

    Oct 7, 2015 · Solved: Hi all One variable in my data set is zip code. It should be a 5 digit number, but of course, for some records it's text, for example,

  2. Extract First 5 Characters of String Variable with Varying Lengths

    Aug 8, 2017 · I have a zip code variable in a dataset that includes both 5- and 9-digit zip codes. I want all of them to be 5-digits but am having trouble extracting the first 5 digits of the variable. …

  3. use length, index, and substr for zipcode variable

    Dec 1, 2019 · It reads zip codes in the form 07417 or 07417-1280 Create variable_9digit. It equals 1 if zipcode has a hyphen separating the fifth and seven digits. Otherwise it equals 0. Write the …

  4. Adding Leading Zero to Character Variable - SAS Communities

    Nov 14, 2021 · Solved: Hi all, I'm setting the zip code to be a 5-digit character variable, and adding a leading zero if there are only 4 digits. data survey;

  5. Trying to Convert Zip Code to Time Zone - Best way to do it?

    Sep 12, 2023 · Hi all, I'm trying to merge zip code and time zone into one dataset and am wondering of the best way to do it. I have two datasets - one that has a zip code variable and …

  6. How to calculate the distance between two 9 digits zip code?

    Aug 24, 2020 · The function zipcitydistance uses sashelp.zip (as documented) and that dataset contains only the five digit zip codes. So you need another function and data-source to …

  7. Transform Data by Zip Code into US Regions - SAS Communities

    Jun 6, 2012 · I have a data set that is listed out by zip code as the mapping coordinate but I would like to group those zip codes into a small number of regions (say 5 or 10). Is there a way to do …

  8. Solved: how to pad character variable with leading zeroes? - SAS ...

    Mar 29, 2011 · 12345 12345 1234 123456789 I want to get a single variable with: first 6 digit from 9 digit zip var; add leading zero where there is 1 less digit zip and keep 6 digit zip value as it …

  9. Function for FIPS codes by County - SAS Support Communities

    Jun 13, 2018 · It took me a while to understand the code is a combination of two codes state and county. Maybe there is more than one type of FIPS code and county codes are two digits.

  10. SAS Zipcode dataset and zip to County Match

    Dec 4, 2009 · Since certain 5-digit zipcodes can cross county lines, how does SAS decide which county to assign to a 5digit ZIP in the ZIPCOSE dataset? My understanding is that one needs …