<?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 remove duplicates based on another variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/remove-duplicates-based-on-another-variable/m-p/850898#M336267</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a dataset as below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;id mode&lt;/P&gt;
&lt;P&gt;mm1 p&lt;/P&gt;
&lt;P&gt;mm1 o&lt;/P&gt;
&lt;P&gt;mm3 p&lt;/P&gt;
&lt;P&gt;mm4 o&lt;/P&gt;
&lt;P&gt;I want to exclude duplicates when if they duplicate and mode=p&lt;/P&gt;
&lt;P&gt;Any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 04:38:55 GMT</pubDate>
    <dc:creator>dustychair</dc:creator>
    <dc:date>2022-12-23T04:38:55Z</dc:date>
    <item>
      <title>remove duplicates based on another variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-duplicates-based-on-another-variable/m-p/850898#M336267</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have a dataset as below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;id mode&lt;/P&gt;
&lt;P&gt;mm1 p&lt;/P&gt;
&lt;P&gt;mm1 o&lt;/P&gt;
&lt;P&gt;mm3 p&lt;/P&gt;
&lt;P&gt;mm4 o&lt;/P&gt;
&lt;P&gt;I want to exclude duplicates when if they duplicate and mode=p&lt;/P&gt;
&lt;P&gt;Any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 04:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-duplicates-based-on-another-variable/m-p/850898#M336267</guid>
      <dc:creator>dustychair</dc:creator>
      <dc:date>2022-12-23T04:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: remove duplicates based on another variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-duplicates-based-on-another-variable/m-p/850900#M336269</link>
      <description>&lt;P&gt;A quick update. I used one of the solutions in this platform. It worked. Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;by id;&lt;BR /&gt;dupflag=^(first.id and last.id);&lt;BR /&gt;if dupflag=1 and mode="P" then delete;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 05:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-duplicates-based-on-another-variable/m-p/850900#M336269</guid>
      <dc:creator>dustychair</dc:creator>
      <dc:date>2022-12-23T05:03:16Z</dc:date>
    </item>
  </channel>
</rss>

