<?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 &amp;quot;zero rows&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265595#M52260</link>
    <description>&lt;P&gt;thank u so much&lt;/P&gt;</description>
    <pubDate>Fri, 22 Apr 2016 07:14:25 GMT</pubDate>
    <dc:creator>Tushh</dc:creator>
    <dc:date>2016-04-22T07:14:25Z</dc:date>
    <item>
      <title>Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265378#M52183</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have dataset from which i want to delete Entire ROWS WHich columns contails following values.(zero, zeros with decimal point &amp;amp; Dot)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;0&amp;nbsp;&amp;nbsp; -: &lt;/STRONG&gt;zero&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;0.000&amp;nbsp; -: &lt;/STRONG&gt;Zeros with decimal&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="7"&gt;.&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; -: &lt;/STRONG&gt;Dot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can i have solution on this? thank you&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 10:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265378#M52183</guid>
      <dc:creator>Tushh</dc:creator>
      <dc:date>2016-04-21T10:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265385#M52184</link>
      <description>&lt;P&gt;Then you would use if, where, select or any other conditional statements:&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if &amp;lt;variable&amp;gt; in (.,0) then delete; &amp;nbsp;/* Assuming numeric &amp;nbsp;*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if &amp;lt;variable&amp;gt; in (".","0","0.000") then delete; &amp;nbsp;/* Assuming character */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or:&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set have (where=(&amp;lt;variable&amp;gt; not in (.,0) or &amp;lt;variable&amp;gt; not in (".","0","0.000")));&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 11:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265385#M52184</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-04-21T11:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265389#M52187</link>
      <description>&lt;P&gt;You say you have a data set ... but is it already a SAS data set? &amp;nbsp;(It would be extremely unusual for a variable to contain "0.000" in a SAS data set, but it is possible.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you looking to apply these conditions to character variables as well? &amp;nbsp;What if the character variable is merely blank and doesn't contain a dot?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 11:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265389#M52187</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-04-21T11:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265390#M52188</link>
      <description>&lt;P&gt;&lt;FONT face="comic sans ms,sans-serif"&gt;If the variable is numeric, you may want to round the value, especially if it is the result of a computation&lt;/FONT&gt;. &amp;nbsp;Sometimes floating point caculations result in values so close to zero, that you want to treat them as zero.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 11:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265390#M52188</guid>
      <dc:creator>Pamela_JSRCC</dc:creator>
      <dc:date>2016-04-21T11:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265392#M52189</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;You say you have a data set ... but is it already a SAS data set? &amp;nbsp;(It would be extremely unusual for a variable to contain "0.000" in a SAS data set, but it is possible.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's mostly right &amp;nbsp;zero is zero but it can be made to appear as 0.000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;40         data _null_;
41            x = 0;
42            put x=f5.3;
43            run;

x=0.000&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 20:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265392#M52189</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-04-22T20:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265399#M52190</link>
      <description>&lt;P&gt;Formatted values can also conceal the true values. So, "0.000" could in fact be 0.000456 (or, in the worst case, something completely different, depending on the format definition).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another potential issue: If you are dealing with numeric values which have been converted to character values, there is a high probability of leading blanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see the examples below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
do x=., 0, 0.000456; /* numeric */
  xf=x;              /* numeric, formatted (see FORMAT statement) */
  t=put(x, 6.3);     /* character */
  c='#'||t||'#';     /* just to make blanks visible */
  output;
end;
format xf 6.3;
proc print;
run;

data want;
set have;
if x | xf | input(t, 30.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A numeric value can be used as an IF condition: It is evaluated as true if and only if it is neither zero nor missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2016 12:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265399#M52190</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-04-21T12:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265580#M52256</link>
      <description>&lt;PRE&gt;

data have;
input x $20.;
if missing(x) then x=.;
cards;
0
00
0.
0.00
0.000
.
..
12
;
run;
data want;
 set have;
 if prxmatch('/^0+$|^0+\.0*$|^\.+$/',strip(x)) then delete;
run;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Apr 2016 02:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265580#M52256</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-22T02:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265594#M52259</link>
      <description>&lt;P&gt;&amp;nbsp;so much all of your efforts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;issue is resolved now&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 07:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265594#M52259</guid>
      <dc:creator>Tushh</dc:creator>
      <dc:date>2016-04-22T07:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Delete "zero rows"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265595#M52260</link>
      <description>&lt;P&gt;thank u so much&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 07:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Delete-quot-zero-rows-quot/m-p/265595#M52260</guid>
      <dc:creator>Tushh</dc:creator>
      <dc:date>2016-04-22T07:14:25Z</dc:date>
    </item>
  </channel>
</rss>

