<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Survey Help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70767#M20375</link>
    <description>Hello All,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to count respondents of a survey.. However the count has to be by address. Is there any kind of code that I can write to count address... Since addresses are so messy and start with charcters I am so lost on how to do it. &lt;BR /&gt;
Right now I have it sorted by surveycd and house number but I need to count the address. &lt;BR /&gt;
&lt;BR /&gt;
example of the data&lt;BR /&gt;
&lt;BR /&gt;
Variables &lt;BR /&gt;
SurveyNumber &lt;BR /&gt;
HouseNumber&lt;BR /&gt;
Street Address&lt;BR /&gt;
ZipCode&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Survey Number  HouseNumber  Street Address ZipCode&lt;BR /&gt;
&lt;BR /&gt;
1                           227             sue lane     254664&lt;BR /&gt;
1                           221             marsh lane  255486&lt;BR /&gt;
3                           2222           people street   25564&lt;BR /&gt;
&lt;BR /&gt;
The house number is sorted but I can't count because I don't know how to count the street name.</description>
    <pubDate>Wed, 08 Sep 2010 18:28:54 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-09-08T18:28:54Z</dc:date>
    <item>
      <title>Survey Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70767#M20375</link>
      <description>Hello All,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to count respondents of a survey.. However the count has to be by address. Is there any kind of code that I can write to count address... Since addresses are so messy and start with charcters I am so lost on how to do it. &lt;BR /&gt;
Right now I have it sorted by surveycd and house number but I need to count the address. &lt;BR /&gt;
&lt;BR /&gt;
example of the data&lt;BR /&gt;
&lt;BR /&gt;
Variables &lt;BR /&gt;
SurveyNumber &lt;BR /&gt;
HouseNumber&lt;BR /&gt;
Street Address&lt;BR /&gt;
ZipCode&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Survey Number  HouseNumber  Street Address ZipCode&lt;BR /&gt;
&lt;BR /&gt;
1                           227             sue lane     254664&lt;BR /&gt;
1                           221             marsh lane  255486&lt;BR /&gt;
3                           2222           people street   25564&lt;BR /&gt;
&lt;BR /&gt;
The house number is sorted but I can't count because I don't know how to count the street name.</description>
      <pubDate>Wed, 08 Sep 2010 18:28:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70767#M20375</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-08T18:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70768#M20376</link>
      <description>You could use the CATX function to create a single address variable, which you could then count using FREQ or MEANS/SUMMARY.&lt;BR /&gt;
[pre]&lt;BR /&gt;
address=catx(' ',number,street,city,state,zip);&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 08 Sep 2010 18:45:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70768#M20376</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-09-08T18:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Survey Help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70769#M20377</link>
      <description>You can do it with SQL&lt;BR /&gt;
&lt;BR /&gt;
SELECT count(*) FROM&lt;BR /&gt;
(SELECT DISTINCT zipcode, StreetAddress, HouseNumber FROM mydata);&lt;BR /&gt;
&lt;BR /&gt;
This assumes that the StreetAddress variable is typed and spelled consistently.  "sue lane" and "sue ln" would be considered different streets by the SQL code.  If your data are large, you may want to invest in a program to regularize the StreetAddress field (MelissaData.com has some).  You could do some of that in the data step with the perl expressions, but it is messy to address all the possibilities.  Just dropping the "lane" or "street" is not sufficient; in Durham, NC, we have "Chapel Hill Rd", "Chapel Hill St", and "Chapel Hill Blvd" within the same ZIP code.&lt;BR /&gt;
&lt;BR /&gt;
Street names are unique within ZIP code, so you need that for the uniqueness.</description>
      <pubDate>Wed, 08 Sep 2010 18:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Survey-Help/m-p/70769#M20377</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-09-08T18:56:08Z</dc:date>
    </item>
  </channel>
</rss>

