<?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: Processing fields based on value(s) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237074#M43448</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/29074"&gt;@Ody﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think, before you start coding, you should write down specifications. Once you have a (preliminary) list of criteria (like "less than 5&amp;nbsp;digits", "more than 5&amp;nbsp;repetitions of the same digit", etc.), it will be fairly straightforward to program the corresponding IF conditions in a data step (maybe using the PRX functions). And many people in the forum will be able to support you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL will probably not come into play, unless you include criteria involving more than one observation&amp;nbsp;at a time (like "more than 3 records have the same phone numbers").&lt;/P&gt;</description>
    <pubDate>Mon, 30 Nov 2015 23:40:33 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2015-11-30T23:40:33Z</dc:date>
    <item>
      <title>Processing fields based on value(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237067#M43445</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a rather large dataset with two fields, phone1 and phone2. These are text based fields with up to 10 digit phone numbers, no special characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm looking for some ideas on how to set a flag field based on what could be a valid number, which is to say if the field is '0000000000', '4488888888', '999999', etc... I'd like to set a flag to mark it as potential unviable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've taken a stab at both proc sql (case statements) and data step (if/else) but I feel like I'm being inefficiant with my approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 22:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237067#M43445</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2015-11-30T22:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Processing fields based on value(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237074#M43448</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/29074"&gt;@Ody﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think, before you start coding, you should write down specifications. Once you have a (preliminary) list of criteria (like "less than 5&amp;nbsp;digits", "more than 5&amp;nbsp;repetitions of the same digit", etc.), it will be fairly straightforward to program the corresponding IF conditions in a data step (maybe using the PRX functions). And many people in the forum will be able to support you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC SQL will probably not come into play, unless you include criteria involving more than one observation&amp;nbsp;at a time (like "more than 3 records have the same phone numbers").&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 23:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237074#M43448</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-30T23:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Processing fields based on value(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237081#M43450</link>
      <description>Thanks for the input. &lt;BR /&gt;&lt;BR /&gt;I'm looking to flag anything that isn't a phone number... so anything less than 10 digits that would exclude obvious non phone number type numbers (or characters in this case since the field is formatted as char). So that would include sequential numbers ascending/descending, repeating digits, etc...</description>
      <pubDate>Tue, 01 Dec 2015 00:37:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237081#M43450</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2015-12-01T00:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Processing fields based on value(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237086#M43451</link>
      <description>You sure? I can't have a phone number that's 780-345-6789?  I think the rules will need to be more clearly specified, etc isn't clear.&lt;BR /&gt;&lt;BR /&gt;At any rate you'll be using a data step, and more than likely regex matching. &lt;BR /&gt;Googling "SAS Phone Number Validation" brought me to this page which is what I think you're looking for:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://heuristically.wordpress.com/2012/10/30/phone-number-validation-in-sas/" target="_blank"&gt;https://heuristically.wordpress.com/2012/10/30/phone-number-validation-in-sas/&lt;/A&gt;</description>
      <pubDate>Tue, 01 Dec 2015 01:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237086#M43451</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-01T01:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Processing fields based on value(s)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237105#M43454</link>
      <description>&lt;P&gt;Wow, thanks for the link and feedback. Not sure why I didn't think of Googling that myself...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: The solution in the linked document worked beautifully. I made some modifications based on what I'm looking for but that gave me a great start. Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 17:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Processing-fields-based-on-value-s/m-p/237105#M43454</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2015-12-01T17:37:44Z</dc:date>
    </item>
  </channel>
</rss>

