<?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: How to delete rows? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286686#M58841</link>
    <description>&lt;P&gt;Use NOBS and delete. I'm not sure if it should be less than or less than and equal to in the comparison so both are there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One will work for you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set sashelp.class NOBS=COUNT;

if NOBS - _n_ &amp;lt; 6 then delete;
*if NOBS - _n_ &amp;lt;= 6 then delete;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 24 Jul 2016 18:26:05 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-24T18:26:05Z</dc:date>
    <item>
      <title>How to delete rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286683#M58840</link>
      <description>&lt;P&gt;How do I delete the last six rows of a dataset?&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286683#M58840</guid>
      <dc:creator>Anon123</dc:creator>
      <dc:date>2016-07-24T18:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286686#M58841</link>
      <description>&lt;P&gt;Use NOBS and delete. I'm not sure if it should be less than or less than and equal to in the comparison so both are there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One will work for you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set sashelp.class NOBS=COUNT;

if NOBS - _n_ &amp;lt; 6 then delete;
*if NOBS - _n_ &amp;lt;= 6 then delete;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286686#M58841</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-24T18:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286689#M58844</link>
      <description>Thanks however it is not working for me. I get this log:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;643&lt;BR /&gt;644 data thesis.rank_ndC;&lt;BR /&gt;645 set thesis.rank_ndd NOBS=COUNT;&lt;BR /&gt;646&lt;BR /&gt;647 if NOBS - _n_ &amp;lt; 6 then delete;&lt;BR /&gt;648 run;&lt;BR /&gt;&lt;BR /&gt;NOTE: Variable NOBS is uninitialized.&lt;BR /&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;25 at 647:9&lt;BR /&gt;NOTE: There were 25 observations read from the data set THESIS.RANK_NDD.&lt;BR /&gt;NOTE: The data set THESIS.RANK_NDC has 0 observations and 11 variables.&lt;BR /&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286689#M58844</guid>
      <dc:creator>Anon123</dc:creator>
      <dc:date>2016-07-24T18:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete rows?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286691#M58846</link>
      <description>&lt;P&gt;Sorry, it should be COUNT in the IF statement, not NOBS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if count - _n_ &amp;lt;6;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2016 18:37:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-delete-rows/m-p/286691#M58846</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-24T18:37:47Z</dc:date>
    </item>
  </channel>
</rss>

