<?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: about the precision of a numeric variable in a dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73992#M3557</link>
    <description>Dale:&lt;BR /&gt;
thank you. that value is from other programming language like fortran or c for a 4 bytes integer. &lt;BR /&gt;
&lt;BR /&gt;
could you please send me the doc where you find the precisely stored value for 4 bytes? I could not find it in SAS help. &lt;BR /&gt;
&lt;BR /&gt;
I did mean to post it in data step and sas langugae element forum but I was browsing each one and did not realize that I posted on the wrong forum. Thank you for the suggestion though.</description>
    <pubDate>Wed, 22 Sep 2010 18:00:29 GMT</pubDate>
    <dc:creator>kwu</dc:creator>
    <dc:date>2010-09-22T18:00:29Z</dc:date>
    <item>
      <title>about the precision of a numeric variable in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73990#M3555</link>
      <description>when I define a numeric variable (or attrib) in a dataset,  since the variable would only have value in the range of 1-9000K, so I would like to define the length of variable to be 4 (bytes). based on rule in other database ststem, a 4 bytes integer should be able to handle max value of 2147483647. However, when try to insert a value greater than 2500k, it starts having the round off error, SAS does not complian the overflow (no warning or error) but just insert it with round off error.&lt;BR /&gt;
I am trying to understand how sas stores the numeric value with different length and how to calculate the safe data range for a specified length? Also is there a way to add a check constrain to let SAS to spit an error when overflow happens? &lt;BR /&gt;
&lt;BR /&gt;
I am new to SAS, any suggestion would be high appreciated.</description>
      <pubDate>Wed, 22 Sep 2010 15:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73990#M3555</guid>
      <dc:creator>kwu</dc:creator>
      <dc:date>2010-09-22T15:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: about the precision of a numeric variable in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73991#M3556</link>
      <description>I don't know where you are getting your value of 2147483647 as the maximum integer value that could be stored precisely in 4 bytes.  SAS documentation for both Windows and Unix environments indicates that the largest integer value which can be precisely stored in 4 bytes is 2097152, far smaller than 9000K=9000000.  A 5 byte variable can precisely represent integer values through 536870912, so increasing your variable length by 1 byte would solve your problem here.&lt;BR /&gt;
&lt;BR /&gt;
I would note that this question is much more about Base SAS than it is about SAS Statistical Procedures.  In fact, I would say that there is really nothing in this post that has to do with Statistical Procedures.  You would be likely to get a much better, more knowledgeable response if you posted your problem in the proper forum.  Might I suggest the SAS Macro Facility, Data Step and SAS Language Elements forum.</description>
      <pubDate>Wed, 22 Sep 2010 16:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73991#M3556</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-09-22T16:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: about the precision of a numeric variable in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73992#M3557</link>
      <description>Dale:&lt;BR /&gt;
thank you. that value is from other programming language like fortran or c for a 4 bytes integer. &lt;BR /&gt;
&lt;BR /&gt;
could you please send me the doc where you find the precisely stored value for 4 bytes? I could not find it in SAS help. &lt;BR /&gt;
&lt;BR /&gt;
I did mean to post it in data step and sas langugae element forum but I was browsing each one and did not realize that I posted on the wrong forum. Thank you for the suggestion though.</description>
      <pubDate>Wed, 22 Sep 2010 18:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73992#M3557</guid>
      <dc:creator>kwu</dc:creator>
      <dc:date>2010-09-22T18:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: about the precision of a numeric variable in a dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73993#M3558</link>
      <description>Here is a link that gives the byte specification and maximum integer values on a Windows OS:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/onlinedoc/913/getDoc/en/hostwin.hlp/numvar.htm" target="_blank"&gt;http://support.sas.com/onlinedoc/913/getDoc/en/hostwin.hlp/numvar.htm&lt;/A&gt;</description>
      <pubDate>Wed, 22 Sep 2010 19:24:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/about-the-precision-of-a-numeric-variable-in-a-dataset/m-p/73993#M3558</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-09-22T19:24:24Z</dc:date>
    </item>
  </channel>
</rss>

