<?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: length of numeric variables in SAS under windows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334445#M75527</link>
    <description>&lt;P&gt;Why do you need to convert these to a numeric variable? If you are not doing calculations it shouldn't be necessary.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Feb 2017 19:33:27 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2017-02-20T19:33:27Z</dc:date>
    <item>
      <title>length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334389#M75510</link>
      <description>&lt;P&gt;I'm trying to convert a char var into numeric var, but the I got something different from waht in the char var.&lt;/P&gt;&lt;P&gt;char_var&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;num_var&lt;/P&gt;&lt;P&gt;0080082362016000002&amp;nbsp;0080082362016000000&lt;BR /&gt;0080082362016000003&amp;nbsp;0080082362016000000&lt;BR /&gt;0114419572016000028&amp;nbsp;0114419572016000032&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The length of the var causes the problem. SAS can only represent 16 digits exactly under windows. Is there any way to overcome this? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 17:18:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334389#M75510</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2017-02-20T17:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334390#M75511</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What type of conversion you need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS numeric variables are 8 byte in length and uses floating representation which has its limits.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#p0ji1unv6thm0dn1gp4t01a1u0g6.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/69852/HTML/default/viewer.htm#p0ji1unv6thm0dn1gp4t01a1u0g6.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you share the code you are running?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 17:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334390#M75511</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2017-02-20T17:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334391#M75512</link>
      <description>&lt;P&gt;Not easily, not that I'm aware of anyways. &amp;nbsp;Here's an &lt;A href="http://www2.sas.com/proceedings/forum2008/021-2008.pdf" target="_self"&gt;article &lt;/A&gt;that discusses various options for bignum handling. &amp;nbsp;When I've needed to use larger numbers I usually offload it to a database like Oracle or Teradata and then do explicit pass-through PROC SQL to handle it.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 17:31:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334391#M75512</guid>
      <dc:creator>Sven111</dc:creator>
      <dc:date>2017-02-20T17:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334394#M75513</link>
      <description>data want;&lt;BR /&gt;set have;&lt;BR /&gt;Num_service=input(service_number, 19.);&lt;BR /&gt;format Num_service z19.;&lt;BR /&gt;run;</description>
      <pubDate>Mon, 20 Feb 2017 17:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334394#M75513</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2017-02-20T17:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334398#M75515</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 17:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334398#M75515</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2017-02-20T17:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334401#M75516</link>
      <description>&lt;P&gt;Are these numbers after all? The leading zeroes make me think that these are actually key &lt;U&gt;strings&lt;/U&gt;&amp;nbsp;consisting of digits only.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 17:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334401#M75516</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-20T17:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334405#M75517</link>
      <description>&lt;P&gt;I was thinking this as well, or even some oddly formatted date/timestamp string (possibly concatenated with another string/value) given that all three examples have 2016 in there.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 18:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334405#M75517</guid>
      <dc:creator>Sven111</dc:creator>
      <dc:date>2017-02-20T18:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334445#M75527</link>
      <description>&lt;P&gt;Why do you need to convert these to a numeric variable? If you are not doing calculations it shouldn't be necessary.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 19:33:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334445#M75527</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-02-20T19:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334450#M75530</link>
      <description>&lt;P&gt;It is string variables, but I want convert them into numeric variables. That is what required in our submission file.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 19:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334450#M75530</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2017-02-20T19:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334456#M75531</link>
      <description>&lt;P&gt;Submission file to what? &amp;nbsp;If you're submitting the final output to something outside of SAS anyways (CSV, etc.) then it shouldn't matter how SAS treats it internally as long as you don't need to do numeric manipulation on that variable.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 20:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334456#M75531</guid>
      <dc:creator>Sven111</dc:creator>
      <dc:date>2017-02-20T20:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334457#M75532</link>
      <description>&lt;P&gt;In pure SAS, numbers like that can't be handled. Technically impossible. Only in proc ds2 you have other number formats at your disposal, or in database systems.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 20:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334457#M75532</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-20T20:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334662#M75594</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What everyone said previously. It's not possible in plain SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But then, why does this have to be numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it for loading into a Database? If so you may typecast it at load and it won't be a &amp;nbsp;problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 14:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334662#M75594</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2017-02-21T14:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334710#M75603</link>
      <description>&lt;P&gt;yes, It is loading into a database. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 16:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334710#M75603</guid>
      <dc:creator>zhuxiaoyan1</dc:creator>
      <dc:date>2017-02-21T16:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: length of numeric variables in SAS under windows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334728#M75605</link>
      <description>&lt;P&gt;OK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then check if you can bulkload the data into your database. If so, DBSASTYPE is option you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acreldb/69580/HTML/default/viewer.htm#n0v4ma1zb9lu99n1728j279rjcqi.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will type cast the column while loading into the database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way, there is no need to convert the character variable into numeric, SAS will do that for you during loading.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 17:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/length-of-numeric-variables-in-SAS-under-windows/m-p/334728#M75605</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2017-02-21T17:55:07Z</dc:date>
    </item>
  </channel>
</rss>

