<?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: oracle variable not showing format and informat in SAS, the value change in proc compare process in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412573#M12612</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Using the FUZZ option as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;suggests&amp;nbsp;is important when comparing floating point data sourced from different platforms (i.e. Oracle and SAS).&lt;/P&gt;
&lt;P&gt;Be aware that there&amp;nbsp;are often&amp;nbsp;small differences in the last bits&amp;nbsp;for such scenarios and that the only way to get around this is to either round() your values or use the FUZZ option.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=n1gv8bfdnhvy9yn1cj8g4di2eqg7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=n1gv8bfdnhvy9yn1cj8g4di2eqg7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Nov 2017 10:57:46 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2017-11-11T10:57:46Z</dc:date>
    <item>
      <title>oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412510#M12608</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have one table from Oracle table, and there is one variable has float type, &amp;nbsp;the value is with two digits in original oracle table(for example &lt;STRONG&gt;14.78&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If I use SQL pass through, I saw the value in SAS table is with two digits (for example &lt;STRONG&gt;14.78&lt;/STRONG&gt;), but the format and informat are blank in SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then if I use SAS proc compare, this value is different from my Teradata data which is &lt;STRONG&gt;14.78&lt;/STRONG&gt;, because right now the value in proc compare result is &lt;STRONG&gt;15&lt;/STRONG&gt; for this oracle variable instead of &lt;STRONG&gt;14.78&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Is there anyone know the reason? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jade&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 21:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412510#M12608</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-10T21:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412515#M12609</link>
      <description>&lt;P&gt;FORMAT and INFORMAT are optional metadata information. They do not change the actual data in any way and so should not have an impact on whether PROC COMPARE sees and difference in the value.&amp;nbsp; The FORMAT and INFORMAT just tell SAS how you want it to&amp;nbsp;print or read the value as text.&amp;nbsp; But SAS already knows how to do that for numeric AND character variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note that in SAS all numeric variables are stored as IEEE floating point numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if your query from Teradata produces 15 instead of 14.78 then the problem it probably on the Teradata side.&lt;/P&gt;
&lt;P&gt;Did you define the variable as INTEGER in Teradata?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 22:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412515#M12609</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-10T22:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412518#M12610</link>
      <description>&lt;P&gt;1. Can you share the code that you are using to create your table from Oracle using SQL pass-through? (feel free to change the names if they're confidential.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. How do you know that there's no format or informat on the SAS dataset that you're creating from Oracle?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 22:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412518#M12610</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2017-11-10T22:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412524#M12611</link>
      <description>&lt;P&gt;Make sure to see the FUZZ option within PROC COMPARE otherwise you may get small results that show as significant.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 22:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412524#M12611</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-10T22:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412573#M12612</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Using the FUZZ option as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;suggests&amp;nbsp;is important when comparing floating point data sourced from different platforms (i.e. Oracle and SAS).&lt;/P&gt;
&lt;P&gt;Be aware that there&amp;nbsp;are often&amp;nbsp;small differences in the last bits&amp;nbsp;for such scenarios and that the only way to get around this is to either round() your values or use the FUZZ option.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=n1gv8bfdnhvy9yn1cj8g4di2eqg7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=acreldb&amp;amp;docsetTarget=n1gv8bfdnhvy9yn1cj8g4di2eqg7.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2017 10:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/412573#M12612</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-11-11T10:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413661#M12633</link>
      <description>&lt;P&gt;Thank you! The Oracle one is giving me trouble, and the format for this variable is&amp;nbsp;float &amp;nbsp;on Oracle.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:31:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413661#M12633</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-15T14:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413662#M12634</link>
      <description>&lt;P&gt;Sure.&lt;/P&gt;&lt;P&gt;1) Proc SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create table Ora_data as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from oralib.table1;&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;P&gt;2) When I do the PROC compare process, it will show the variable format of the base table and compare table, so I can see the format of the original oracle table did not get carried on to SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413662#M12634</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-15T14:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413663#M12635</link>
      <description>&lt;P&gt;I tried with criteria=0.001 and the values are considered as equal now, but with FUZZ=0.001 it did not work for me. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413663#M12635</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-15T14:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413664#M12636</link>
      <description>&lt;P&gt;The most likely causes of a value looking like 15 instead of 14.78 is rounding.&amp;nbsp; So if your SAS variable does not have a format attached that would do the rounding then the value was either rounded by the way it was calculated or perhaps rounded by the way SAS pulled it from Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show the code that you used to pull the data.&amp;nbsp; Preferable you can make a simple example that recreates the problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might even be able to do this without referring to any datasets in Oracle or Teradata. In TERADATA you can write a SELECT without any FROM clause.&amp;nbsp; What happens if you do this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select * from connection to teradata
(select 14.78/1.0 as floatvar, 1478/100 as intvar )
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In ORACLE you can do something similar by selection FROM DUAL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413664#M12636</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-15T14:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413666#M12637</link>
      <description>&lt;P&gt;Thank you, Tom, I will try it.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413666#M12637</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-15T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413672#M12638</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124089"&gt;@Jade_SAS&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Sure.&lt;/P&gt;
&lt;P&gt;1) Proc SQL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create table Ora_data as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select * from oralib.table1;&lt;/P&gt;
&lt;P&gt;Quit;&lt;/P&gt;
&lt;P&gt;2) When I do the PROC compare process, it will show the variable format of the base table and compare table, so I can see the format of the original oracle table did not get carried on to SAS.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I doubt that SAS changed the value when moved from Oracle in that manner. If you see 15 and you expected 14.78 then check that process in Oracle that create TABLE1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you mean by "format of the original oracle table"?&amp;nbsp; In SAS a FORMAT definition is just instructions to be used by SAS when translating the value stored in the variable to text when you print it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS every variable is either a fixed length character string or a floating point number.&amp;nbsp; In Oracle you can have a large variety of variable types, but they all need to be mapped to one of the two types that SAS supports.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for example SAS/Access to Oracle knows how to translate Oracle DATE value to SAS datetime values and will automatically attach a DATETIME format to the variable so that it will look like a datetime value when you print it.&amp;nbsp; Similarly if you have a variable defined in Oracle as DECIMAL then SAS will try to attach a proper format for displaying the floating point value it stores with the same number of digits.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Oracle you can define many more variable types.&amp;nbsp; Does Oracle also have a concept that is similar to the SAS FORMAT concept?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 15:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413672#M12638</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-15T15:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: oracle variable not showing format and informat in SAS, the value change in proc compare process</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413714#M12640</link>
      <description>&lt;P&gt;I want to clarify that In step1 (the SQL Pass through), the value I see from SAS is 14.78, but while I am doing the step2 (PROC Compare), the value is 15.&lt;/P&gt;&lt;P&gt;Thank you very much for the inputs!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 16:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/oracle-variable-not-showing-format-and-informat-in-SAS-the-value/m-p/413714#M12640</guid>
      <dc:creator>Jade_SAS</dc:creator>
      <dc:date>2017-11-15T16:05:51Z</dc:date>
    </item>
  </channel>
</rss>

