About 1,160 results
Open links in new tab
  1. 5 digit zip code - SAS Communities

    Oct 7, 2015 · Well, first, I want to delete any zip code that isn't 5 characters long. All zip codes must be 5 characters long (which can include leading 0). If it's character, that's fine, for this …

  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. 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 …

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

    Dec 1, 2019 · - digits 1 to 5 = a number - digits 7 to 9 = a number - 6th digit = an hyphen. The use of the prxmatch function is a more efficient way to do that but you can also use the traditional …

  5. 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 …

  6. Solved: converting 5 digit date code - SAS Support Communities

    Feb 11, 2015 · Hi All, When I import my data from excel to SAS, the date field (12/1/2014) comes as 5 digit (41651) code. Can anyone tell me how to turn it back to date (12JAN2014) format in …

  7. Solved: Adding Trailing Zeros - SAS Support Communities

    Nov 10, 2021 · The data structure cannot have leading zero's because it requires the first two to be a state FIPS code identifier. As such I need to add extra characters to the end of the unique …

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

    Mar 29, 2011 · I have a similar problem. My zip variable data has following values: zip. 123456789. 123456789. 1234. 1234. 12345. 123456789. 12345. 12345. 1234. 123456789 . I …

  9. adding leading zeros and changing to string - SAS Communities

    Mar 7, 2023 · It's ID for MCD, Minor Civil Division, and should be 5 digits long. Some of the numbers -should- have leading zeros. So Geo IDs in the data file like "210" should be "00210". …

  10. Converting Data Using Another Data Set - SAS Communities

    Jan 26, 2018 · I need to find a way to have one ID correspond to multiple Counties or States if the 3 digits of the zip code correspond to multiple zip codes. I also need to remove any …