<?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 numeric resizing erroneous results in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68131#M19507</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I execute the following in SAS 9.1:&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table work.test1(x int);&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
data work.test11;&lt;BR /&gt;
length x 4;&lt;BR /&gt;
set work.test1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
insert into work.test11&lt;BR /&gt;
values (20081101)&lt;BR /&gt;
;&lt;BR /&gt;
quit;&lt;BR /&gt;
/* !! 20081101 --&amp;gt; 20081088 in work.test11 */&lt;BR /&gt;
&lt;BR /&gt;
I have the unpleasant surprise to see that inserting the integer value 20081101 into a 4-byte numeric column changes the value to 20081088.&lt;BR /&gt;
&lt;BR /&gt;
Is this a serious bug in SAS or am I doing something wrong?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for help,&lt;BR /&gt;
Chris</description>
    <pubDate>Wed, 07 Jan 2009 17:14:08 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-01-07T17:14:08Z</dc:date>
    <item>
      <title>numeric resizing erroneous results</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68131#M19507</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I execute the following in SAS 9.1:&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create table work.test1(x int);&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
data work.test11;&lt;BR /&gt;
length x 4;&lt;BR /&gt;
set work.test1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
insert into work.test11&lt;BR /&gt;
values (20081101)&lt;BR /&gt;
;&lt;BR /&gt;
quit;&lt;BR /&gt;
/* !! 20081101 --&amp;gt; 20081088 in work.test11 */&lt;BR /&gt;
&lt;BR /&gt;
I have the unpleasant surprise to see that inserting the integer value 20081101 into a 4-byte numeric column changes the value to 20081088.&lt;BR /&gt;
&lt;BR /&gt;
Is this a serious bug in SAS or am I doing something wrong?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for help,&lt;BR /&gt;
Chris</description>
      <pubDate>Wed, 07 Jan 2009 17:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68131#M19507</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-07T17:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: numeric resizing erroneous results</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68132#M19508</link>
      <description>length 4 is too small, please read &lt;A href="http://support.sas.com/techsup/technote/ts654.pdf" target="_blank"&gt;http://support.sas.com/techsup/technote/ts654.pdf&lt;/A&gt;</description>
      <pubDate>Wed, 07 Jan 2009 17:29:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68132#M19508</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-07T17:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: numeric resizing erroneous results</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68133#M19509</link>
      <description>Thanks a lot for pointing that resource, urchin.&lt;BR /&gt;
Until now , I thought that 4 bytes for numeric type in SAS can hold 32 bits of integer values, thus the limit (for signed integers) of around 2 billion for positive values.&lt;BR /&gt;
Now I realize that SAS stores in a different way the numeric values and I also wonder if there is a way to have 4 bytes numeric size and still be able to hold 32 bits signed integers (in other words, is there a way to change the way SAS stores integers?).&lt;BR /&gt;
&lt;BR /&gt;
Chris</description>
      <pubDate>Wed, 07 Jan 2009 17:42:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/numeric-resizing-erroneous-results/m-p/68133#M19509</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-01-07T17:42:08Z</dc:date>
    </item>
  </channel>
</rss>

