<?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: Identical numeric values are not matching in proc compare in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468487#M119667</link>
    <description>&lt;P&gt;Try it again?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get an exact match when I run your program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your program a simplification of the original circumstances?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 18:56:39 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-06-07T18:56:39Z</dc:date>
    <item>
      <title>Identical numeric values are not matching in proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468486#M119666</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;The following seq values in my data same values in both base and compare data sets. But when I run proc compare in my actual data&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the values are not matched. Please suggest.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The length,informat, format in both actual datasets are 8,8.,8. respectively.&lt;/P&gt;
&lt;P&gt;If I copy the values into 'one' and 'two' data sets (shown below) and compare the values are matching.&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Compare results showing:&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE summary="Page Layout" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE class="batch"&gt;5.3537E14  5.3537E14      -1999  -3.73E-10&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input seq;
datalines;
5.354E14
;
run;

data two;
input seq;
datalines;
5.354E14
;
run;

proc compare base=one compare=two;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 18:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468486#M119666</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-06-07T18:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Identical numeric values are not matching in proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468487#M119667</link>
      <description>&lt;P&gt;Try it again?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get an exact match when I run your program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your program a simplification of the original circumstances?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 18:56:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468487#M119667</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-07T18:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Identical numeric values are not matching in proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468488#M119668</link>
      <description>&lt;P&gt;if you examine the values with a different format such as 24.8 you might very well see a difference. The format will round values to display them within the limits of the stated characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you place them into a data set that way you are&amp;nbsp;providing a rounded value that is identical when read so that has no bearing on the values of the variables in the other data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC COMPARE has the CRITERION and METHOD options that will set different rules determining equality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should show the code you were using to compare the values. There are a number of ways where small differences can be set to be considered equal if needed but depend on the comparison used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of two values that are not equal but "appear" equal when a format is applied.&lt;/P&gt;
&lt;PRE&gt;data example;
   x= 12345678910.123;
   y= 12345678910.456;
run;

proc print data=example;
   format x y best8.;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 19:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468488#M119668</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-07T19:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Identical numeric values are not matching in proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468489#M119669</link>
      <description>&lt;P&gt;I get the same results that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input seq;
datalines;
5.354E14
;
run;

data two;
input seq1;
datalines;
5.354E14
;
run;

proc compare base=one compare=two;
VAR seq;
WITH seq1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;SAS Output&lt;/P&gt;&lt;DIV class="branch"&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;&lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;PRE class="batch"&gt; Number of Observations in Common: 1.                                 
      Total Number of Observations Read from WORK.ONE: 1.                  
      Total Number of Observations Read from WORK.TWO: 1.                  
                                                                           
      Number of Observations with Some Compared Variables Unequal: 0.      
      Number of Observations with All Compared Variables Equal: 1.         
                                                                           
   &lt;STRONG&gt;   NOTE: No unequal values were found. All values compared are exactly  
            equal.    &lt;/STRONG&gt;                                                     
                     &lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Jun 2018 18:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468489#M119669</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-07T18:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Identical numeric values are not matching in proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468497#M119671</link>
      <description>&lt;P&gt;Thank you very much for the reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The values are not matching in my actual comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the values are matching if copy the same values into one and two data sets.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 19:19:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468497#M119671</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-06-07T19:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Identical numeric values are not matching in proc compare</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468503#M119675</link>
      <description>&lt;P&gt;You can use the FUZZ option, to specify what level of detail you want. Note the results there say the error is really really low,&amp;nbsp;&lt;/P&gt;
&lt;PRE class="batch"&gt;-3.73E-10&lt;/PRE&gt;
&lt;P&gt;Which is 0.000000000373.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you can set FUZZ to mask errors less than 0.01.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc compare base=one compare=two fuzz=0.01;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 19:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identical-numeric-values-are-not-matching-in-proc-compare/m-p/468503#M119675</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-07T19:24:28Z</dc:date>
    </item>
  </channel>
</rss>

