<?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: Data issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252506#M47957</link>
    <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68272"&gt;@knveraraju91﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of these numbers are different, both mathematically and for SAS. The latter is shown by the code below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input hour;
cards;
23.67
-22.48
-1.33
23.666666
-22.4833333
-1.3333333
23.666666667
-22.48333333
-1.333333333
;

proc sort data=test nodupkey;
by hour;
run;

proc print data=test;
format hour best12.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So, if the "raw data" were e.g. 23.67 and you obtained 23.666666, then the raw data must have been rounded. Similarly, the vendor's values could be truncated to fewer decimals to match&amp;nbsp;your results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When working with numeric variables&amp;nbsp;in&amp;nbsp;SAS you should always distinguish between&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the ("true") value stored internally, which is used for calculations, comparisons etc. and&lt;/LI&gt;
&lt;LI&gt;the displayed value, which is always a formatted value.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What file format are the raw data and how did you import them into SAS?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What file format are the vendor's data?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2016 19:35:23 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2016-02-25T19:35:23Z</dc:date>
    <item>
      <title>Data issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252462#M47922</link>
      <description>&lt;P&gt;Hi I need help for the following question.&lt;/P&gt;&lt;P&gt;Raw data Variable HOUR values are:&lt;/P&gt;&lt;P&gt;23.67&lt;BR /&gt;-22.48&lt;BR /&gt;-1.33&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My code: VSTPTNUM=HOUR;&lt;/P&gt;&lt;P&gt;Results;&lt;/P&gt;&lt;P&gt;23.666666&lt;/P&gt;&lt;P&gt;-22.4833333&lt;/P&gt;&lt;P&gt;-1.3333333&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But the data got from vendor shows results:&lt;/P&gt;&lt;P&gt;23.666666667&lt;/P&gt;&lt;P&gt;-22.48333333&lt;/P&gt;&lt;P&gt;-1.333333333&lt;/P&gt;&lt;P&gt;How did the vendor data shows more digits after decimal than my results. please help in my code. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 18:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252462#M47922</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2016-02-25T18:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252490#M47943</link>
      <description>&lt;P&gt;I believe this is an issue in numerical precision and how your data is stored within a computer. You can google the term to find many questions and the responses for dealing with this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess my question is what do you want for an output? Also, did you specify informats/formats and you don't show how the vendor recevied/imported the number. &amp;nbsp;Currently there's too many unknowns to comment beyond the above statement.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 19:08:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252490#M47943</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-25T19:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Data issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252506#M47957</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68272"&gt;@knveraraju91﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of these numbers are different, both mathematically and for SAS. The latter is shown by the code below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input hour;
cards;
23.67
-22.48
-1.33
23.666666
-22.4833333
-1.3333333
23.666666667
-22.48333333
-1.333333333
;

proc sort data=test nodupkey;
by hour;
run;

proc print data=test;
format hour best12.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So, if the "raw data" were e.g. 23.67 and you obtained 23.666666, then the raw data must have been rounded. Similarly, the vendor's values could be truncated to fewer decimals to match&amp;nbsp;your results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When working with numeric variables&amp;nbsp;in&amp;nbsp;SAS you should always distinguish between&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the ("true") value stored internally, which is used for calculations, comparisons etc. and&lt;/LI&gt;
&lt;LI&gt;the displayed value, which is always a formatted value.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What file format are the raw data and how did you import them into SAS?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What file format are the vendor's data?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 19:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/252506#M47957</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-02-25T19:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Data issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/254291#M48474</link>
      <description>&lt;P&gt;A real crude guess: the original data you looked at was in Excel and set to display 2 decimals even though more were present. And then the data was imported to SAS using Proc import which ignores Excel decimal setting.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2016 19:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-issue/m-p/254291#M48474</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-03T19:05:20Z</dc:date>
    </item>
  </channel>
</rss>

