<?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 do I identify non-integers in a WHERE statement? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121559#M10063</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mage NE INT(mage)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2012 21:32:32 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2012-09-13T21:32:32Z</dc:date>
    <item>
      <title>How do I identify non-integers in a WHERE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121558#M10062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;I'm doing some quality checking on a data set I have and want to include in a where statement some command to identify numbers that are not integers over a certain interval.&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;Particularly I'm trying to do this for the variable for maternal age (mage).&amp;nbsp; How do I pull out observations where the mage variable is not an integer?&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;Thanks.&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;CODING:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;PROC PRINT DATA=work.DATA;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;WHERE&amp;nbsp; &lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;(dead NE 1 AND dead NE 0) OR&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;(sex NE 1 AND sex NE 0) OR&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;(rc_gp NE 1 AND rc_gp NE 2 AND rc_gp NE 3 AND rc_gp NE 4 AND rc_gp NE 5) OR&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt; (hisp NE 0 AND hisp NE 1) OR&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;(8 GE mage OR mage GE 85)&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;(medu LE 5 OR medu GT 17);&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;RUN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 21:28:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121558#M10062</guid>
      <dc:creator>mconover</dc:creator>
      <dc:date>2012-09-13T21:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I identify non-integers in a WHERE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121559#M10063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mage NE INT(mage)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2012 21:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121559#M10063</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-09-13T21:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I identify non-integers in a WHERE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121560#M10064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or :&lt;/P&gt;&lt;P&gt;mage ne floor(mage)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mage ne ceil(mage)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 01:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121560#M10064</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-09-14T01:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I identify non-integers in a WHERE statement?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121561#M10065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be a quite different approach:&lt;/P&gt;&lt;P&gt;- suppose you have SAS-formats defined to the wanted valid integer values&lt;/P&gt;&lt;P&gt;&amp;nbsp; For the variable sex:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0='M'&amp;nbsp; or male,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1='F' or female m ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9= ' ' missing , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; other= "-" invalid ... the meaning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Testing on the formatted value of you variable will give a very strict data quality approach&lt;/P&gt;&lt;P&gt;&amp;nbsp; Use the put or input function to recode/format values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember that numbers in SAS are always of type floating. The storage needed is requiring normally 8 bytes.&lt;BR /&gt;Sometimes 1 is not 1 but nearly 1 and you don't see it. It can be a reason of a failed assignment. Rounding up can be necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To circumvent the floating issues you can think about having it set as character-types.&amp;nbsp; 0, 1 9 can be perfectly stored and processed as character-values. The requirement is you don't&amp;nbsp; need to calculate with these values.&amp;nbsp; Just counting the values in a population is no problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 05:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-do-I-identify-non-integers-in-a-WHERE-statement/m-p/121561#M10065</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2012-09-14T05:39:18Z</dc:date>
    </item>
  </channel>
</rss>

