<?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 find the correct PAN #(ex: ABCDF1234J)in a given data. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107946#M22422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks For your quick reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any other ways to do this.. i was pretty new to&amp;nbsp; "prxparse" expressions. i can not able to understand the expression..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaswanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Dec 2012 11:25:08 GMT</pubDate>
    <dc:creator>yaswanthj</dc:creator>
    <dc:date>2012-12-25T11:25:08Z</dc:date>
    <item>
      <title>How to find the correct PAN #(ex: ABCDF1234J)in a given data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107944#M22420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style=": ; color: #222222; background-color: #ffffff; font-family: arial, sans-serif;"&gt;Hi, &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #222222; background-color: #ffffff; font-family: arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #222222; background-color: #ffffff; font-family: arial, sans-serif;"&gt;How to find the correct PAN # in a given data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #222222; background-color: #ffffff; font-family: arial, sans-serif;"&gt;data can be in any format..A PAN should be first 5 chars,fallowed by 4 digits and ends with char...need to create a flag where PAN is in correct FORMAT&amp;nbsp; on not.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; color: #222222; background-color: #ffffff; font-family: arial, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input tt $10.&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;abcde1234f&lt;/P&gt;&lt;P&gt;bcdef2345g&lt;/P&gt;&lt;P&gt;bh4hg2351h&lt;/P&gt;&lt;P&gt;1235456797&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my above data 1st and 2nd records are in correct format, other records should be flogged with "incorrect".&amp;nbsp; My question is that, i want data in correct format i.e 1st and 2nd obs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help, that should be&amp;nbsp; appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaswanth &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2012 09:56:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107944#M22420</guid>
      <dc:creator>yaswanthj</dc:creator>
      <dc:date>2012-12-25T09:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the correct PAN #(ex: ABCDF1234J)in a given data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107945#M22421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is easy for Perl Regular Expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data test;
input tt $10.;
pid=prxparse('/^[a-zA-Z]{5,5}\d{4,4}[a-zA-Z]$/');
if prxmatch(pid,tt) then found=1;else found=0;
drop pid;
cards;
abcde1234f
bcdef2345g
bh4hg2351h
1235456797
;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2012 11:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107945#M22421</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-25T11:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the correct PAN #(ex: ABCDF1234J)in a given data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107946#M22422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks For your quick reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any other ways to do this.. i was pretty new to&amp;nbsp; "prxparse" expressions. i can not able to understand the expression..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yaswanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2012 11:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107946#M22422</guid>
      <dc:creator>yaswanthj</dc:creator>
      <dc:date>2012-12-25T11:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the correct PAN #(ex: ABCDF1234J)in a given data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107947#M22423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or split it into three part to judge ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data test;
input tt&amp;nbsp; $10.;
if length(tt) = 10 then do;
 if notalpha(substr(tt,1,5)) or notdigit(substr(tt,6,4)) or notalpha(substr(tt,10,1)) then found=0;else found=1;
end;
cards;
abcde1234f
bcdef2345g
bh4hg2351h
1235456797
;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2012 12:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107947#M22423</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-25T12:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the correct PAN #(ex: ABCDF1234J)in a given data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107948#M22424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you..it is working &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yaswanth J.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 08:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107948#M22424</guid>
      <dc:creator>yaswanthj</dc:creator>
      <dc:date>2012-12-26T08:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the correct PAN #(ex: ABCDF1234J)in a given data.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107949#M22425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bit Simplified your Solution..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;input tt&amp;nbsp; $10.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if Sum(notalpha(substr(tt,1,5)),notdigit(substr(tt,6,4)),notalpha(substr(tt,10,1))) then found=0;else found=1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cards;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;abcde1234f&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;bcdef2345g&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;bh4hg2351h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1235456797&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;abcde1234f8&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Proc print;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Per my knowledge&amp;nbsp; "&lt;STRONG&gt;if length(tt) = 10 then do;&lt;/STRONG&gt;" condition was not required in your program because&amp;nbsp; already&amp;nbsp; Length of the TT variable&amp;nbsp; mentioned&amp;nbsp; as&amp;nbsp; &lt;STRONG&gt;10&lt;/STRONG&gt; in input statement.:-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjeev.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 10:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-the-correct-PAN-ex-ABCDF1234J-in-a-given-data/m-p/107949#M22425</guid>
      <dc:creator>kuridisanjeev</dc:creator>
      <dc:date>2012-12-26T10:00:43Z</dc:date>
    </item>
  </channel>
</rss>

