<?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: Delete last row datastep in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499153#M132768</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;: No, the traffic there has been diminishing for a number of years now. However, I still look there every day as it doesn't require a lot of time and I still learn things that I otherwise would have missed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 15:50:59 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2018-09-26T15:50:59Z</dc:date>
    <item>
      <title>Delete last row datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/498904#M132664</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; ln_no $ state $ loans amt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1123 AL 1 100&lt;/P&gt;
&lt;P&gt;1123 AL 1 100&lt;/P&gt;
&lt;P&gt;1123 AL 2 150&lt;/P&gt;
&lt;P&gt;1233 AL 2 150&lt;/P&gt;
&lt;P&gt;CA 3 50&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; want;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*if last. then delete;run;*/&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = last;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;if&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; last &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I have tried several methods to delete the last row of the datastep.&amp;nbsp; How would I delete the last observation&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/498904#M132664</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2018-09-26T01:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete last row datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/498912#M132665</link>
      <description>&lt;P&gt;did you miss the set statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;want;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;set have&amp;nbsp;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;= last;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;not&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;last&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/498912#M132665</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-26T01:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete last row datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/498913#M132666</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ln_no : $ state : $ loans amt;
datalines;
1123 AL 1 100
1123 AL 1 100
1123 AL 2 150
1233 AL 2 150
1234 CA 3 50
;
run;
data want;
	set have end=last;
	if not last then output;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/498913#M132666</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-26T01:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete last row datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499145#M132764</link>
      <description>&lt;P&gt;This question was cross posted on the SAS-L bulletin board. There,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;showed a method that is way more efficient, namely one that doesn't require reading and re-writing all of the records you want to keep:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  point=nobs;
  modify have nobs=nobs point=point;
  remove;
  stop;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 15:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499145#M132764</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-09-26T15:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete last row datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499148#M132765</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;. Just out of curiosity, do you still see much traffic on SAS-L?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 15:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499148#M132765</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-26T15:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delete last row datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499153#M132768</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;: No, the traffic there has been diminishing for a number of years now. However, I still look there every day as it doesn't require a lot of time and I still learn things that I otherwise would have missed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 15:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-last-row-datastep/m-p/499153#M132768</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-09-26T15:50:59Z</dc:date>
    </item>
  </channel>
</rss>

