<?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 do i check all the bytes are same in a variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472370#M121124</link>
    <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; this works perfectly&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 04:31:47 GMT</pubDate>
    <dc:creator>elangooff1</dc:creator>
    <dc:date>2018-06-22T04:31:47Z</dc:date>
    <item>
      <title>how do i check all the bytes are same in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472360#M121120</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to check a field whether all the bytes are having same values.&lt;/P&gt;&lt;P&gt;Eg. I need to check&amp;nbsp; field EMP_ID which is 9bytes&lt;/P&gt;&lt;P&gt;IF EMP_ID in ('111111111','222222222','333333333',...,'999999999') then&amp;nbsp;&lt;/P&gt;&lt;P&gt;message = 'invalid employee id';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to replicate the above scenario in an optimal way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 03:26:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472360#M121120</guid>
      <dc:creator>elangooff1</dc:creator>
      <dc:date>2018-06-22T03:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: how do i check all the bytes are same in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472365#M121122</link>
      <description>&lt;P&gt;How about&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if compress(emp_id,substr(emp_id,1,1)) ="" then .....;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jun 2018 03:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472365#M121122</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-22T03:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: how do i check all the bytes are same in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472370#M121124</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; this works perfectly&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 04:31:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472370#M121124</guid>
      <dc:creator>elangooff1</dc:creator>
      <dc:date>2018-06-22T04:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: how do i check all the bytes are same in a variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472371#M121125</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/122770"&gt;@elangooff1&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;You'll probably need some extra treatment for missing source strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here some additional coding options.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  infile datalines truncover;
  input instr $char16.;
  flg1 =prxmatch('/^(\d)\1*$/o',strip(instr));
  flg2 =prxmatch('/^(\d)\1*$/o',compress(instr));
  flg3 = compress(instr,substr(instr,1,1)) eq " ";
  datalines;
11111111
2222
11111121
333 333
  444 444
  
 555 6 55
 777 7 77
aaaaaaa
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jun 2018 04:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-do-i-check-all-the-bytes-are-same-in-a-variable/m-p/472371#M121125</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-22T04:40:53Z</dc:date>
    </item>
  </channel>
</rss>

