<?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: Removing incorrect phone numbers from 1 million records in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237126#M14763</link>
    <description>&lt;P&gt;Hi Shivi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a parallel thread about almost the same topic:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Processing-fields-based-on-value-s/m-p/237105#M43454" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Processing-fields-based-on-value-s/m-p/237105#M43454&lt;/A&gt;. Part of the recommendations given there may be applicable to your case.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Dec 2015 09:12:22 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2015-12-01T09:12:22Z</dc:date>
    <item>
      <title>Removing incorrect phone numbers from 1 million records</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237124#M14762</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have working on a data which has 1 million observations.&lt;/P&gt;
&lt;P&gt;This data contains the phone numbers of our customers.&lt;/P&gt;
&lt;P&gt;During the booking process the resources enter the phone numbers of our clients however there are many instances where an incorrect phone number has been entered lets says "9999999999". &amp;lt;&lt;EM&gt;&lt;STRONG&gt;this is an india format with 10 digits and no country code&lt;/STRONG&gt;&lt;/EM&gt;&amp;gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have run proc freq on this data and can see there is approx 19.5% of the data which is incorrect i.e. in the format like "9999999999", "1111111111" etc which are written in varuous ways.&lt;/P&gt;
&lt;P&gt;I need to delete this data and only keep the valid phone numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;running if delete statement would have done the trick however as i mentioned the ph number is written in various ways (all numeric).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly suggest an easy way if possible. I am working on SAS developer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards, Shivi&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 08:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237124#M14762</guid>
      <dc:creator>Shivi82</dc:creator>
      <dc:date>2015-12-01T08:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Removing incorrect phone numbers from 1 million records</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237126#M14763</link>
      <description>&lt;P&gt;Hi Shivi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a parallel thread about almost the same topic:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Processing-fields-based-on-value-s/m-p/237105#M43454" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Processing-fields-based-on-value-s/m-p/237105#M43454&lt;/A&gt;. Part of the recommendations given there may be applicable to your case.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 09:12:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237126#M14763</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-12-01T09:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Removing incorrect phone numbers from 1 million records</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237129#M14764</link>
      <description>&lt;P&gt;Ok, the easy way:&lt;/P&gt;
&lt;P&gt;Write down what a valid phone number consists of, for example:&lt;/P&gt;
&lt;P&gt;- Comprises of 9 numbers&lt;/P&gt;
&lt;P&gt;- All numeric&lt;/P&gt;
&lt;P&gt;- Prefixed by 001&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Write your datastep logic to match this:&lt;/P&gt;
&lt;PRE&gt;data want;
&amp;nbsp; set have;
&amp;nbsp; select;
&amp;nbsp; &amp;nbsp; case (length(phone)&amp;gt;9) delete;
    case (compress(phone," ","d")) delete;
    case (substr(phone,1,3) ne "001") delete;
    otherwise;
  end;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Dec 2015 09:20:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237129#M14764</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-12-01T09:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Removing incorrect phone numbers from 1 million records</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237146#M14766</link>
      <description>Thanks for sharing the link but this has made me go bonkers. The article shared in the link was enormous and very difficult to understand as not really an expert on sas macros.</description>
      <pubDate>Tue, 01 Dec 2015 11:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-incorrect-phone-numbers-from-1-million-records/m-p/237146#M14766</guid>
      <dc:creator>Shivi82</dc:creator>
      <dc:date>2015-12-01T11:39:43Z</dc:date>
    </item>
  </channel>
</rss>

