<?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: Numeric - Double precision in SPDS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36851#M9342</link>
    <description>To give an example if my data is,&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Col1&lt;/B&gt;&lt;BR /&gt;
----- &lt;BR /&gt;
50&lt;BR /&gt;
10&lt;BR /&gt;
10&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Col2&lt;/B&gt;&lt;BR /&gt;
----- &lt;BR /&gt;
3&lt;BR /&gt;
2&lt;BR /&gt;
4&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And my derived column is : &lt;BR /&gt;
&lt;BR /&gt;
Col3 = Col1 / Col2;&lt;BR /&gt;
&lt;BR /&gt;
In this case the output is, &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Col3&lt;/B&gt;&lt;BR /&gt;
-----&lt;BR /&gt;
16.66666&lt;BR /&gt;
5&lt;BR /&gt;
2.5&lt;BR /&gt;
&lt;BR /&gt;
If I have to identify the maximum precision value,  then in this case it is '5'. Now is there any function or utility which will help me identifying this maximum precision.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Satya</description>
    <pubDate>Tue, 26 May 2009 17:48:41 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-05-26T17:48:41Z</dc:date>
    <item>
      <title>Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36847#M9338</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
We have set of numeric variables in a dataset. It's having double precision value in it. We could not identify format or informat while describing the table. &lt;BR /&gt;
&lt;BR /&gt;
How we would be able to identify the minimum and maximum precision values?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Satya</description>
      <pubDate>Tue, 26 May 2009 17:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36847#M9338</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-26T17:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36848#M9339</link>
      <description>Read this documentation reference about SAS numeric variables and precision (internal), and you would need to use the appropriate output FORMAT for displaying your data.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS Variables &lt;BR /&gt;
&lt;BR /&gt;
Numeric Precision in SAS Software&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000695157.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000695157.htm&lt;/A&gt;</description>
      <pubDate>Tue, 26 May 2009 17:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36848#M9339</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-26T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36849#M9340</link>
      <description>Thanks for the quick reply.&lt;BR /&gt;
&lt;BR /&gt;
Sorry, my earlier post was not clear. &lt;BR /&gt;
&lt;BR /&gt;
The columns are calculated columns and has internal precision value as '.', though it contains precision values.&lt;BR /&gt;
&lt;BR /&gt;
So I am not able to Identify the maximum precison value this numeric field holds. &lt;BR /&gt;
&lt;BR /&gt;
Please suggest.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Satya</description>
      <pubDate>Tue, 26 May 2009 17:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36849#M9340</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-26T17:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36850#M9341</link>
      <description>You are indicating that the variable value is a SAS MISSING (or sometimes considered a NULL) value.  There is the same precision for such a variable, determined by the SAS LENGTH associated with the variable.  If unspecified, the default is SAS numeric length 8 (unless overridden).&lt;BR /&gt;
&lt;BR /&gt;
Your condition appears to be that your SAS variable is not being computed, so you will want to review your SAS code.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 26 May 2009 17:34:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36850#M9341</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-26T17:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36851#M9342</link>
      <description>To give an example if my data is,&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Col1&lt;/B&gt;&lt;BR /&gt;
----- &lt;BR /&gt;
50&lt;BR /&gt;
10&lt;BR /&gt;
10&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Col2&lt;/B&gt;&lt;BR /&gt;
----- &lt;BR /&gt;
3&lt;BR /&gt;
2&lt;BR /&gt;
4&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And my derived column is : &lt;BR /&gt;
&lt;BR /&gt;
Col3 = Col1 / Col2;&lt;BR /&gt;
&lt;BR /&gt;
In this case the output is, &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Col3&lt;/B&gt;&lt;BR /&gt;
-----&lt;BR /&gt;
16.66666&lt;BR /&gt;
5&lt;BR /&gt;
2.5&lt;BR /&gt;
&lt;BR /&gt;
If I have to identify the maximum precision value,  then in this case it is '5'. Now is there any function or utility which will help me identifying this maximum precision.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Satya</description>
      <pubDate>Tue, 26 May 2009 17:48:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36851#M9342</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-26T17:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36852#M9343</link>
      <description>You do not need to identify any maximum precision.  The only reason to shorten the SAS LENGTH of a numeric variable would be to conserve disk space -- normally something you need not be concerned about.  What you need to be concerned about is what "output format" to use, given your data -- again a default assignment normally satisfies the condition.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 26 May 2009 17:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36852#M9343</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-26T17:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36853#M9344</link>
      <description>Basically I want to migrate this dataset into another database eg.Oracle. So to create a table in Oracle, I should know maximum decimal precision value / attribute definition for that column to migrate this column to Oracle.</description>
      <pubDate>Tue, 26 May 2009 18:23:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36853#M9344</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-26T18:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36854#M9345</link>
      <description>I have tried the following code using data step and proc sql techniques. Let me know if it doesn't fit your requirement.&lt;BR /&gt;
&lt;BR /&gt;
data sample;&lt;BR /&gt;
  input col1 col2;&lt;BR /&gt;
  cards;&lt;BR /&gt;
  50 3&lt;BR /&gt;
  10 2&lt;BR /&gt;
  10 4&lt;BR /&gt;
  ;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data sample1(drop=col3_c);&lt;BR /&gt;
  set sample;&lt;BR /&gt;
  col3=col1/col2;&lt;BR /&gt;
  col3_c=left(put(col3,best.));&lt;BR /&gt;
  precision=length(scan(col3_c,2, '.'));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
  create table sample2 as &lt;BR /&gt;
  select col1, col2, col3, max(precision) as max_precision&lt;BR /&gt;
  from sample1;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
~Sukanya E</description>
      <pubDate>Tue, 26 May 2009 19:18:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36854#M9345</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-26T19:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric - Double precision in SPDS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36855#M9346</link>
      <description>Consider using SAS PROC MEANS to analyze your SAS numeric data, if you need to know about data-value range.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 26 May 2009 20:41:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Numeric-Double-precision-in-SPDS/m-p/36855#M9346</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-05-26T20:41:16Z</dc:date>
    </item>
  </channel>
</rss>

