<?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 Identifying deleted duplicates using a lag statement. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452056#M114048</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data finals.palmbeach17;
set finals.palmbeachsales17;
if lag (parcel_id)=parcel_id and lag (sale_prc)=sale_prc and lag (sale_mo)=sale_mo then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am trying to look at the observations that are being deleted from this lag statement above. Is there anyway I can print or capture the deleted observations?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 19:01:54 GMT</pubDate>
    <dc:creator>andrewfau</dc:creator>
    <dc:date>2018-04-06T19:01:54Z</dc:date>
    <item>
      <title>Identifying deleted duplicates using a lag statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452056#M114048</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data finals.palmbeach17;
set finals.palmbeachsales17;
if lag (parcel_id)=parcel_id and lag (sale_prc)=sale_prc and lag (sale_mo)=sale_mo then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am trying to look at the observations that are being deleted from this lag statement above. Is there anyway I can print or capture the deleted observations?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 19:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452056#M114048</guid>
      <dc:creator>andrewfau</dc:creator>
      <dc:date>2018-04-06T19:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying deleted duplicates using a lag statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452057#M114049</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data finals.palmbeach17 check;
set finals.palmbeachsales17;
if lag (parcel_id)=parcel_id and lag (sale_prc)=sale_prc and lag (sale_mo)=sale_mo then do;
output check;
end;
else output finals.palmbeach17;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 19:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452057#M114049</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-04-06T19:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying deleted duplicates using a lag statement.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452059#M114050</link>
      <description>&lt;P&gt;Better sort the data and use first./last. to separate between the duplicates and the last one,&lt;/P&gt;
&lt;P&gt;for examle:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
    by parcel_d sale_mo /* month ? */ sale_prc;
run;

data ones dups;
  set have;
   by parcel_d sale_mo sale_prc;
      if last.sale_prc then output ones;
      else output dups;
run;   &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Apr 2018 19:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identifying-deleted-duplicates-using-a-lag-statement/m-p/452059#M114050</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-04-06T19:09:51Z</dc:date>
    </item>
  </channel>
</rss>

