<?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 a duplicate and hold min date value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Remove-a-duplicate-and-hold-min-date-value/m-p/529647#M144750</link>
    <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to sort out the duplicate comments and holds the min date by ID in my table.&lt;/P&gt;&lt;P&gt;For Exmpl&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id comments$ date mmddyy10.;
cards;
100 cmmnt1 10/11/2017
105 cmmnt3 12/12/2018
100 cmmnt1 09/10/2012
108 cmmnt2 07/08/2016
100 cmmnt2 08/11/2015
run;
proc print data = have;
format date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For this, my output should&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;100 cmmnt1 09/10/2012&lt;/P&gt;&lt;P&gt;100 cmmnt2 08/11/2015&lt;/P&gt;&lt;P&gt;105 cmmnt3&amp;nbsp;&lt;CODE class=" language-sas"&gt;12/12/2018&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;108 cmmnt2 07/08/2016&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to get this output.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jan 2019 10:36:36 GMT</pubDate>
    <dc:creator>Sathish_jammy</dc:creator>
    <dc:date>2019-01-24T10:36:36Z</dc:date>
    <item>
      <title>Remove a duplicate and hold min date value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-a-duplicate-and-hold-min-date-value/m-p/529647#M144750</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to sort out the duplicate comments and holds the min date by ID in my table.&lt;/P&gt;&lt;P&gt;For Exmpl&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id comments$ date mmddyy10.;
cards;
100 cmmnt1 10/11/2017
105 cmmnt3 12/12/2018
100 cmmnt1 09/10/2012
108 cmmnt2 07/08/2016
100 cmmnt2 08/11/2015
run;
proc print data = have;
format date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For this, my output should&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;100 cmmnt1 09/10/2012&lt;/P&gt;&lt;P&gt;100 cmmnt2 08/11/2015&lt;/P&gt;&lt;P&gt;105 cmmnt3&amp;nbsp;&lt;CODE class=" language-sas"&gt;12/12/2018&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;108 cmmnt2 07/08/2016&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to get this output.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 10:36:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-a-duplicate-and-hold-min-date-value/m-p/529647#M144750</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2019-01-24T10:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove a duplicate and hold min date value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Remove-a-duplicate-and-hold-min-date-value/m-p/529649#M144752</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc sort data=HAVE out=TMP ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; by ID COMMENTS DATE;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc sort data=TMP out=WANT nodupkey;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; by ID COMMENTS;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2019 11:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Remove-a-duplicate-and-hold-min-date-value/m-p/529649#M144752</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-01-24T11:00:41Z</dc:date>
    </item>
  </channel>
</rss>

