<?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 empty rows from a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15168#M1968</link>
    <description>if nmiss( of _numeric_ ) or cats( of _character_ ) =' ' then delete ;&lt;BR /&gt;
 &lt;BR /&gt;
this looks likely to do what is needed, &lt;BR /&gt;
If there were not enough space in the default holder for cats() results, then you you are certainly not "missing", even if you get a warning.</description>
    <pubDate>Thu, 16 Jun 2011 17:00:14 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-06-16T17:00:14Z</dc:date>
    <item>
      <title>Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15165#M1965</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
   Is there any way to delete a row if all the coulmns in the row has empty values.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Thu, 16 Jun 2011 11:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15165#M1965</guid>
      <dc:creator>kishore415</dc:creator>
      <dc:date>2011-06-16T11:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15166#M1966</link>
      <description>Hi,&lt;BR /&gt;
Had read this somewhere.&lt;BR /&gt;
It should help you...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data work.test;&lt;BR /&gt;
  infile cards missover;&lt;BR /&gt;
  input (a b c) ($1.)  x y z;&lt;BR /&gt;
  if missing(coalesceC(of _character_)) and missing(coalesce(of&lt;BR /&gt;
_numeric_)) then delete;&lt;BR /&gt;
  cards;&lt;BR /&gt;
abc 1 2 3&lt;BR /&gt;
&lt;BR /&gt;
def 3 4 5&lt;BR /&gt;
;;;;&lt;BR /&gt;
  run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
  run;</description>
      <pubDate>Thu, 16 Jun 2011 11:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15166#M1966</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2011-06-16T11:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15167#M1967</link>
      <description>Thanks NN that helped me a lot..</description>
      <pubDate>Thu, 16 Jun 2011 11:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15167#M1967</guid>
      <dc:creator>kishore415</dc:creator>
      <dc:date>2011-06-16T11:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15168#M1968</link>
      <description>if nmiss( of _numeric_ ) or cats( of _character_ ) =' ' then delete ;&lt;BR /&gt;
 &lt;BR /&gt;
this looks likely to do what is needed, &lt;BR /&gt;
If there were not enough space in the default holder for cats() results, then you you are certainly not "missing", even if you get a warning.</description>
      <pubDate>Thu, 16 Jun 2011 17:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15168#M1968</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-06-16T17:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15169#M1969</link>
      <description>[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data work.test;&lt;BR /&gt;
infile cards missover;&lt;BR /&gt;
input (a b c) ($1.) x y z;&lt;BR /&gt;
cards;&lt;BR /&gt;
abc 1 2 3&lt;BR /&gt;
&lt;BR /&gt;
def 3 4 5&lt;BR /&gt;
;;;;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
options missing=' ';&lt;BR /&gt;
data want;&lt;BR /&gt;
 set test;&lt;BR /&gt;
 if missing(cats(of _all_)) then delete;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Mon, 20 Jun 2011 05:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15169#M1969</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-20T05:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15170#M1970</link>
      <description>this code is not removing the empty rows</description>
      <pubDate>Mon, 20 Jun 2011 06:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15170#M1970</guid>
      <dc:creator>Ankitsas</dc:creator>
      <dc:date>2011-06-20T06:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15171#M1971</link>
      <description>Are you run my code?&lt;BR /&gt;
I test it ,it is successful under SAS9.2.&lt;BR /&gt;
The dataset want has no missing row.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Mon, 20 Jun 2011 10:09:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15171#M1971</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-20T10:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Delete empty rows from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15172#M1972</link>
      <description>Or Under Patrick's suggestion.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
data work.test;&lt;BR /&gt;
infile cards missover;&lt;BR /&gt;
input (a b c) ($1.) x y z;&lt;BR /&gt;
cards;&lt;BR /&gt;
abc 2 2 3&lt;BR /&gt;
&lt;BR /&gt;
def 3 4 5&lt;BR /&gt;
&lt;BR /&gt;
abc 2 2 3&lt;BR /&gt;
abc 2 2 3&lt;BR /&gt;
;;;;&lt;BR /&gt;
run;&lt;BR /&gt;
%let dsid=%sysfunc(open(test));&lt;BR /&gt;
%let nvar=%sysfunc(attrn(&amp;amp;dsid,nvar));&lt;BR /&gt;
%let dsid=%sysfunc(close(&amp;amp;dsid));&lt;BR /&gt;
data want;&lt;BR /&gt;
 set test;&lt;BR /&gt;
 if cmiss(of _all_) ge &amp;amp;nvar then delete;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Tue, 21 Jun 2011 01:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-empty-rows-from-a-dataset/m-p/15172#M1972</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-21T01:27:42Z</dc:date>
    </item>
  </channel>
</rss>

