<?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 Re: How to Remove Observation that do not look like an address in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501938#M133910</link>
    <description>&lt;P&gt;This article contains code that cleans up US addresses. I would suggest using it to parse the addresses. And any that don't parse as desired are deleted.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://analytics.ncsu.edu/sesug/2008/CC-028.pdf" target="_blank"&gt;https://analytics.ncsu.edu/sesug/2008/CC-028.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have a data set which is addresses due to the data being messy, I need to remove the address that look like a number;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Example -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;101Crawfordstreet&lt;/P&gt;
&lt;P&gt;200miltonave&lt;/P&gt;
&lt;P&gt;10-101adamsways&lt;/P&gt;
&lt;P&gt;123&lt;/P&gt;
&lt;P&gt;10&lt;/P&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;P&gt;105R&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have already compressed the address to remove any blanks, I need to remove 0 10 123 102R etc. anything that does not make any sense...is there a way to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Oct 2018 15:10:23 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-05T15:10:23Z</dc:date>
    <item>
      <title>How to Remove Observation that do not look like an address</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501906#M133895</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a data set which is addresses due to the data being messy, I need to remove the address that look like a number;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Example -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;101Crawfordstreet&lt;/P&gt;&lt;P&gt;200miltonave&lt;/P&gt;&lt;P&gt;10-101adamsways&lt;/P&gt;&lt;P&gt;123&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;105R&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already compressed the address to remove any blanks, I need to remove 0 10 123 102R etc. anything that does not make any sense...is there a way to do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 13:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501906#M133895</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2018-10-05T13:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove Observation that do not look like an address</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501924#M133902</link>
      <description>&lt;P&gt;I think you should put more logic for address but below code will work for you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; 
data have;
input address $30.;
datalines;
101Crawfordstreet
200miltonave
10-101adamsways
123
10
0
105R
;

data want;
set have;
if anyalpha(address) = 0 then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Oct 2018 14:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501924#M133902</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-10-05T14:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove Observation that do not look like an address</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501931#M133907</link>
      <description>&lt;P&gt;In addition to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37783"&gt;@kiranv_&lt;/a&gt;, I would add another condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;;
if anyalpha(address) = 0 or length(compress(address,,'ka'))&amp;lt;5   then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;compress(address,,'ka') will keep only the &lt;SPAN&gt;alphabetic characters.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Likewise depending on your data you might add additional conditions that fits to your needs.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 15:04:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501931#M133907</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-10-05T15:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove Observation that do not look like an address</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501938#M133910</link>
      <description>&lt;P&gt;This article contains code that cleans up US addresses. I would suggest using it to parse the addresses. And any that don't parse as desired are deleted.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://analytics.ncsu.edu/sesug/2008/CC-028.pdf" target="_blank"&gt;https://analytics.ncsu.edu/sesug/2008/CC-028.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238046"&gt;@SNG1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have a data set which is addresses due to the data being messy, I need to remove the address that look like a number;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Example -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;101Crawfordstreet&lt;/P&gt;
&lt;P&gt;200miltonave&lt;/P&gt;
&lt;P&gt;10-101adamsways&lt;/P&gt;
&lt;P&gt;123&lt;/P&gt;
&lt;P&gt;10&lt;/P&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;P&gt;105R&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have already compressed the address to remove any blanks, I need to remove 0 10 123 102R etc. anything that does not make any sense...is there a way to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 15:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501938#M133910</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-05T15:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove Observation that do not look like an address</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501989#M133938</link>
      <description>&lt;P&gt;Thanks a Lot Everyone the solution provided worked from all by adding a few changes (i.e. filters) of my own...much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 16:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501989#M133938</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2018-10-05T16:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Remove Observation that do not look like an address</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501990#M133939</link>
      <description>&lt;P&gt;Thanks Surya...your worked perfectly for my purpose much appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 16:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Remove-Observation-that-do-not-look-like-an-address/m-p/501990#M133939</guid>
      <dc:creator>SNG1</dc:creator>
      <dc:date>2018-10-05T16:39:31Z</dc:date>
    </item>
  </channel>
</rss>

