<?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: identify rows containing decimals in a numeric column(with out converting in to a character colu in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771238#M244697</link>
    <description>&lt;P&gt;the logic before programming in code seems to be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;if decimal present in col2 then ......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in base SAS code try finding something simpler that&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;if mod( col2, 1 ) then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* ~something ~ ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 20:44:15 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2021-09-29T20:44:15Z</dc:date>
    <item>
      <title>identify rows containing decimals in a numeric column(with out converting in to a character column)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771222#M244690</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have 2 columns such as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;col1&amp;nbsp; &amp;nbsp; &amp;nbsp; col2&lt;/P&gt;
&lt;P&gt;xxxxx&amp;nbsp; 0.5&lt;/P&gt;
&lt;P&gt;yyyyy&amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;zzzz&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;kkkk&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;llllllll&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;xxxxx&amp;nbsp; 1.5&lt;/P&gt;
&lt;P&gt;yyyyy&amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;zzzz&amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;kkkk&amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;llllllll&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;................. similarly i have values up to 60.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My COL2 is numeric, Looking for a procedure to find out to TAG the rows containing decimal values, the order can not be changed? (with out converting the column in to character and then using any function to pick the decmial)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 19:34:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771222#M244690</guid>
      <dc:creator>sahoositaram555</dc:creator>
      <dc:date>2021-09-29T19:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: identify rows containing decimals in a numeric column(with out converting in to a character colu</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771223#M244691</link>
      <description>So &lt;BR /&gt;&lt;BR /&gt;decimal = floor(col2) - col2;&lt;BR /&gt;if decimal = 0 then .....now what??</description>
      <pubDate>Wed, 29 Sep 2021 19:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771223#M244691</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T19:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: identify rows containing decimals in a numeric column(with out converting in to a character colu</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771225#M244692</link>
      <description>&lt;P&gt;I'm not sure I follow. Are you looking to tag/flag non-integers?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 19:39:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771225#M244692</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-09-29T19:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: identify rows containing decimals in a numeric column(with out converting in to a character colu</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771226#M244693</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/109034"&gt;@sahoositaram555&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have 2 columns such as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;col1&amp;nbsp; &amp;nbsp; &amp;nbsp; col2&lt;/P&gt;
&lt;P&gt;xxxxx&amp;nbsp; 0.5&lt;/P&gt;
&lt;P&gt;yyyyy&amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;zzzz&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;kkkk&amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;
&lt;P&gt;llllllll&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;xxxxx&amp;nbsp; 1.5&lt;/P&gt;
&lt;P&gt;yyyyy&amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;zzzz&amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;kkkk&amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;
&lt;P&gt;llllllll&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;................. similarly i have values up to 60.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My COL2 is numeric, Looking for a procedure to find out to TAG the rows containing decimal values, the order can not be changed? (with out converting the column in to character and then using any function to pick the decmial)&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Basic approach is to see if the value when converted to an integer is equal to the original value. If so then there is no decimal, if there is a difference then there is a decimal portion to the value.&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   tag = (intz(col2) ne col2);
run;&lt;/PRE&gt;
&lt;P&gt;SAS returns 1 for true and 0 for false. So the comparison above would be 1 when the decimal portion returned by the INTZ function is not equal to the original value.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 19:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771226#M244693</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-29T19:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: identify rows containing decimals in a numeric column(with out converting in to a character colu</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771238#M244697</link>
      <description>&lt;P&gt;the logic before programming in code seems to be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;if decimal present in col2 then ......&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in base SAS code try finding something simpler that&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;if mod( col2, 1 ) then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* ~something ~ ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 20:44:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771238#M244697</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2021-09-29T20:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: identify rows containing decimals in a numeric column(with out converting in to a character colu</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771239#M244698</link>
      <description>perhaps &lt;BR /&gt;   TAG = ^^mod( col2, 1 ) ;&lt;BR /&gt;where TAG should be 1 when there are decimals, and 0 when col2 is integer or missing</description>
      <pubDate>Wed, 29 Sep 2021 20:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identify-rows-containing-decimals-in-a-numeric-column-with-out/m-p/771239#M244698</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2021-09-29T20:47:23Z</dc:date>
    </item>
  </channel>
</rss>

