<?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: proc copy causes decimal value change? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-copy-causes-decimal-value-change/m-p/27666#M5100</link>
    <description>0.01 and 0.00999... represent the same real number.&lt;BR /&gt;
&lt;BR /&gt;
SAS does not store decimal numbers exactly (unlike, say, COBOL).  It stores all numbers as real numbers.  A base-10 decimal number cannot be represented exactly in a base-2 system (integers can be represented exactly).&lt;BR /&gt;
&lt;BR /&gt;
There are also a couple of standards for the internal structure of a real number.  There is  possibility that DB/2 and SAS use different standards, which could exacerbate this problem.&lt;BR /&gt;
&lt;BR /&gt;
To really tease it out you will have to read the "fine print" in both DB/2 and SAS for numeric representation.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
    <pubDate>Wed, 06 May 2009 12:18:20 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2009-05-06T12:18:20Z</dc:date>
    <item>
      <title>proc copy causes decimal value change?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-copy-causes-decimal-value-change/m-p/27665#M5099</link>
      <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
I am facing an unexpected issue here.&lt;BR /&gt;
&lt;BR /&gt;
There's field X (decimal 7.2) a in a DB/2 database, which contains the value 0.01.&lt;BR /&gt;
&lt;BR /&gt;
Once I run a proc copy into a SAS dataset (also decimal 7.2), the value is changed to 0.00999...8.&lt;BR /&gt;
&lt;BR /&gt;
Why does this happen? It does not behave like this for e.g. 100.00.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Thomas</description>
      <pubDate>Wed, 06 May 2009 09:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-copy-causes-decimal-value-change/m-p/27665#M5099</guid>
      <dc:creator>ThomasH</dc:creator>
      <dc:date>2009-05-06T09:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: proc copy causes decimal value change?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-copy-causes-decimal-value-change/m-p/27666#M5100</link>
      <description>0.01 and 0.00999... represent the same real number.&lt;BR /&gt;
&lt;BR /&gt;
SAS does not store decimal numbers exactly (unlike, say, COBOL).  It stores all numbers as real numbers.  A base-10 decimal number cannot be represented exactly in a base-2 system (integers can be represented exactly).&lt;BR /&gt;
&lt;BR /&gt;
There are also a couple of standards for the internal structure of a real number.  There is  possibility that DB/2 and SAS use different standards, which could exacerbate this problem.&lt;BR /&gt;
&lt;BR /&gt;
To really tease it out you will have to read the "fine print" in both DB/2 and SAS for numeric representation.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Wed, 06 May 2009 12:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-copy-causes-decimal-value-change/m-p/27666#M5100</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-05-06T12:18:20Z</dc:date>
    </item>
  </channel>
</rss>

