<?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: Remove duplicate string with condiction? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421198#M103620</link>
    <description>&lt;P&gt;Hi RW9:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologized that I didn't make my sample dataset clearly.&amp;nbsp;&amp;nbsp; I only need to remove the duplicated in (10, 20, 30, 40).&amp;nbsp; In other word, if the&amp;nbsp;duplicates&amp;nbsp;are in&amp;nbsp;(15, 27, and 45), I would like to keep them.&amp;nbsp;&amp;nbsp; Please see my adjusted post above.&amp;nbsp;&amp;nbsp; Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2017 15:20:24 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2017-12-14T15:20:24Z</dc:date>
    <item>
      <title>Remove duplicate string with condiction?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421174#M103613</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to remove the group containing (10, 20, 30, and 40) duplicates with the stings the same in Class, Component and Product.&amp;nbsp;&amp;nbsp; If the strings in Class, Component and Product are different, I would like to keep it.&amp;nbsp; Therefore, my final result should be something list below.&amp;nbsp;&amp;nbsp; Please advice.&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; datalines &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dsd&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Group Class : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Component : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Product : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10, ANTI/INSULIN, , ,&lt;/P&gt;
&lt;P&gt;10, ANTI/INSULIN, , ,&lt;/P&gt;
&lt;P&gt;10, ANTI/VITA, , ,&lt;/P&gt;
&lt;P&gt;15, PHENAZO, , ,&lt;/P&gt;
&lt;P&gt;15, PHENAZO, , ,&lt;/P&gt;
&lt;P&gt;19, Large, , ,&lt;/P&gt;
&lt;P&gt;20, , HERBS, ,&lt;/P&gt;
&lt;P&gt;20, , PSYCH, ,&lt;/P&gt;
&lt;P&gt;20, , PSYCH, ,&lt;/P&gt;
&lt;P&gt;22, , SKIN, ,&lt;/P&gt;
&lt;P&gt;27, , HERBS, ,&lt;/P&gt;
&lt;P&gt;27, , HERBS, ,&lt;/P&gt;
&lt;P&gt;30, ANTI/INSULIN, , PHENAZO,&lt;/P&gt;
&lt;P&gt;30, ANTI/INSULIN, , PHENAZO,&lt;/P&gt;
&lt;P&gt;40, , , FLOWER,&lt;/P&gt;
&lt;P&gt;40, , , SUBST,&lt;/P&gt;
&lt;P&gt;45, , , BANZOCAINE,&lt;/P&gt;
&lt;P&gt;45, , , BANZOCAINE,&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; final; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;infile&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; datalines &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;dsd&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Group Class : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Component : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Product : &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$20.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;10, ANTI/INSULIN, , ,&lt;/P&gt;
&lt;P&gt;10, ANTI/VITA, , ,&lt;/P&gt;
&lt;P&gt;15, PHENAZO, , ,&lt;/P&gt;
&lt;P&gt;15, PHENAZO, , ,&lt;/P&gt;
&lt;P&gt;19, Large, , ,&lt;/P&gt;
&lt;P&gt;20, , HERBS, ,&lt;/P&gt;
&lt;P&gt;20, , PSYCH, ,&lt;/P&gt;
&lt;P&gt;22, , SKIN, ,&lt;/P&gt;
&lt;P&gt;27, , HERBS, ,&lt;/P&gt;
&lt;P&gt;27, , HERBS, ,&lt;/P&gt;
&lt;P&gt;30, ANTI/INSULIN, , PHENAZO,&lt;/P&gt;
&lt;P&gt;40, , , FLOWER,&lt;/P&gt;
&lt;P&gt;40, , , SUBST,&lt;/P&gt;
&lt;P&gt;45, , , BANZOCAINE,&lt;/P&gt;
&lt;P&gt;45, , , BANZOCAINE,&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 15:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421174#M103613</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-12-14T15:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate string with condiction?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421178#M103614</link>
      <description>&lt;P&gt;Is that really your question, as I would think:&lt;/P&gt;
&lt;PRE&gt;proc sort data=test nodupkey;
  by group class;
run;&lt;/PRE&gt;
&lt;P&gt;Would suffice?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 14:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421178#M103614</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-14T14:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate string with condiction?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421198#M103620</link>
      <description>&lt;P&gt;Hi RW9:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologized that I didn't make my sample dataset clearly.&amp;nbsp;&amp;nbsp; I only need to remove the duplicated in (10, 20, 30, 40).&amp;nbsp; In other word, if the&amp;nbsp;duplicates&amp;nbsp;are in&amp;nbsp;(15, 27, and 45), I would like to keep them.&amp;nbsp;&amp;nbsp; Please see my adjusted post above.&amp;nbsp;&amp;nbsp; Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 15:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421198#M103620</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-12-14T15:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate string with condiction?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421202#M103621</link>
      <description>&lt;P&gt;Then subset + sort:&lt;/P&gt;
&lt;PRE&gt;data temp;
  set have;
  where group in (10,20,30,40);
run;
proc sort data=temp nodupkey;
  by group class;
run;
data want;
  set have (where=(group not in (10,20,30,40)) temp;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Dec 2017 15:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421202#M103621</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-14T15:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate string with condiction?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421217#M103627</link>
      <description>&lt;P&gt;Awesome! thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 15:47:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-duplicate-string-with-condiction/m-p/421217#M103627</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-12-14T15:47:19Z</dc:date>
    </item>
  </channel>
</rss>

