<?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: Char Variable All possible Character in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211526#M52247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Patrick it worked...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2015 08:11:22 GMT</pubDate>
    <dc:creator>rkumar23</dc:creator>
    <dc:date>2015-07-27T08:11:22Z</dc:date>
    <item>
      <title>Char Variable All possible Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211523#M52244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I have a 8 byte long Character variable example NNNNNNNN&amp;nbsp; Now This word will replace with "D" at any of the 8 character so for example It can be DNNNNNNN or DDNNNNNN&amp;nbsp; now my requirement is only select those observation where minimum within this string there are TWO DD so out of three above only with "DDNNNNNN" contain observation should be selected...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to consider possibility that D can be at any location so it can be combination like NNDNNNDN&amp;nbsp; or any combination like that...Can somebody share thoughts how do we select these observations?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 07:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211523#M52244</guid>
      <dc:creator>rkumar23</dc:creator>
      <dc:date>2015-07-27T07:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Char Variable All possible Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211524#M52245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use a compress() function and remove anything other than 'D'. Then you check if the remaining string (only Ds) has at least a length of 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input row string $ select_expected;&lt;/P&gt;&lt;P&gt;&amp;nbsp; datalines;&lt;/P&gt;&lt;P&gt;1 NNDNNNDN 1&lt;/P&gt;&lt;P&gt;2 DNNNNNNN 0&lt;/P&gt;&lt;P&gt;3 NNNDNNNN 0&lt;/P&gt;&lt;P&gt;4 NNDNDNDN 1&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;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if lengthn(compress(string,'D','k'))&amp;gt;=2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 07:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211524#M52245</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-07-27T07:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Char Variable All possible Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211525#M52246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;if count(var,'D','i') gt 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---&amp;nbsp; i ignores case&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results a dataset which contains minimum of two D's (either D or d) in a variable Var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;if count(var,'D') gt 1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Results a dataset which contains minimum of two D's (only D) in a variable Var.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 08:05:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211525#M52246</guid>
      <dc:creator>MadhuKorni</dc:creator>
      <dc:date>2015-07-27T08:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Char Variable All possible Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211526#M52247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Patrick it worked...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 08:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Char-Variable-All-possible-Character/m-p/211526#M52247</guid>
      <dc:creator>rkumar23</dc:creator>
      <dc:date>2015-07-27T08:11:22Z</dc:date>
    </item>
  </channel>
</rss>

