<?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: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653667#M36166</link>
    <description>&lt;P&gt;Thank you, but as I wrote earlier, the option of downloading a text format is not currently considered.&lt;/P&gt;
&lt;P&gt;Reproducing Steps:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. Create a dataset with 16-digit numeric variables.&lt;BR /&gt;2. Upload it to Oracle through "Create table ... as select * from dataset_from_step_N1 " or through the sqlldr utility - it does not matter.&lt;BR /&gt;3. Make sure that in the database the last digit of the number is rounded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you create a &lt;STRONG&gt;dataset&lt;/STRONG&gt;&amp;nbsp;in SAS based on what was done in step one, through "Create table ... as select * from dataset_from_step_N1", you can see that numbers less than 9,007,199,254,740,992 (as stated in the documentation) are not rounded.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jun 2020 15:29:01 GMT</pubDate>
    <dc:creator>HULK</dc:creator>
    <dc:date>2020-06-05T15:29:01Z</dc:date>
    <item>
      <title>After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653565#M36160</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Met the following problem.&lt;/P&gt;
&lt;P&gt;There is a dataset with numerical variables consisting of 16 digits.&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_tbl;
format t1 t2 t3 t4 t5 t6 t7 t8 t9 best20.;
t1 = 1111111111111111;
t2 = 2222222222222222;
t3 = 3333333333333333;
t4 = 4444444444444444;
t5 = 5555555555555555;
t6 = 6666666666666666;
t7 = 7777777777777777;
t8 = 8888888888888888;
t9 = 9999999999999999;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After running this part of the code, the dataset is as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HULK_0-1591355566307.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40458iA9BCFFC662A00AAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HULK_0-1591355566307.png" alt="HULK_0-1591355566307.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The screenshot shows that all 16-digit numbers are displayed correctly, except for the last - 9999999999999999. It is rounded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Further, we are trying to upload this table to the Oracle database:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table oracle_lib.test_tbl
AS SELECT * FROM work.test_tbl;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the database, this table is as follows&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HULK_1-1591357677105.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40459iDFB7DDE11C726677/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HULK_1-1591357677105.png" alt="HULK_1-1591357677105.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now we see that all 16-digit numbers are rounded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need the correct display of 16-digit numbers in the database. The option of converting to a character format does not suit us.&lt;/P&gt;
&lt;P&gt;I read on the forum that other users had problems with rounding large numbers, but they had a problem, if the number consists of more than 16 digits. In this particular case, all numbers do not exceed the 16-digit format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas why this is happening? Is there any way to upload such numbers into the database in the correct format?&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>Fri, 05 Jun 2020 12:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653565#M36160</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-05T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653566#M36161</link>
      <description>The max length for number in SAS is 15 , therefore transfer it into oracle by a string, and let oracle DM translate it back .</description>
      <pubDate>Fri, 05 Jun 2020 12:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653566#M36161</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-05T12:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653578#M36162</link>
      <description>&lt;P&gt;Is there a documented statement that the length of a number in cac is 15 digits?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;By searching the sas documentation, I found information that sas can work with a maximum of 8 byte numbers (the maximum number is 9,007,199,254,740,992). This is just the same confirmed by the first case from the description of the problem (all numbers are displayed correctly except 9999999999999999).&lt;/P&gt;
&lt;P&gt;Problems begin to appear only when uploading to Oracle Database.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 12:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653578#M36162</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-05T12:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653585#M36163</link>
      <description>&lt;P&gt;One question, what is the source of the&amp;nbsp;test_tbl table? Is it a text file by chance?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe you could do it like this:&lt;/P&gt;
&lt;P&gt;1) Load text file with 16 digit numbers data into SAS dataset as text strings.&lt;/P&gt;
&lt;P&gt;2) use Proc DS2 to convert text to bigint(up to 19 digits) [&lt;A href="https://documentation.sas.com/api/docsets/ds2pg/9.4/content/ds2pg.pdf?locale=en" target="_blank"&gt;https://documentation.sas.com/api/docsets/ds2pg/9.4/content/ds2pg.pdf?locale=en&lt;/A&gt;]&lt;/P&gt;
&lt;P&gt;3) upload oracle from the Proc DS2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 13:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653585#M36163</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-06-05T13:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653586#M36164</link>
      <description>Unfortunately, the source of the table is numerical data, not text.&lt;BR /&gt;This upload to the database is an integral part of a larger and more complex process.&lt;BR /&gt;&lt;BR /&gt;In the description of the problem, I just gave an example of how to reproduce this problem.</description>
      <pubDate>Fri, 05 Jun 2020 13:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653586#M36164</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-05T13:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653601#M36165</link>
      <description>&lt;P&gt;I suspect that issue might be on Oracle side with converting the floating point value gotten from SAS into the DECIMAL(16) number.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide more details on what you actually did?&amp;nbsp; You might need to just convert the SAS numeric to string and upload that and then convert back to DECIMAL(16) in the remote database.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might want to open a support ticket with SAS so they can give more detailed support.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 14:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653601#M36165</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-05T14:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653667#M36166</link>
      <description>&lt;P&gt;Thank you, but as I wrote earlier, the option of downloading a text format is not currently considered.&lt;/P&gt;
&lt;P&gt;Reproducing Steps:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. Create a dataset with 16-digit numeric variables.&lt;BR /&gt;2. Upload it to Oracle through "Create table ... as select * from dataset_from_step_N1 " or through the sqlldr utility - it does not matter.&lt;BR /&gt;3. Make sure that in the database the last digit of the number is rounded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you create a &lt;STRONG&gt;dataset&lt;/STRONG&gt;&amp;nbsp;in SAS based on what was done in step one, through "Create table ... as select * from dataset_from_step_N1", you can see that numbers less than 9,007,199,254,740,992 (as stated in the documentation) are not rounded.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 15:29:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653667#M36166</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-05T15:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653701#M36167</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108513"&gt;@HULK&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you, but as I wrote earlier, the option of downloading a text format is not currently considered.&lt;/P&gt;
&lt;P&gt;Reproducing Steps:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. Create a dataset with 16-digit numeric variables.&lt;BR /&gt;2. Upload it to Oracle through "Create table ... as select * from dataset_from_step_N1 " or through the sqlldr utility - it does not matter.&lt;BR /&gt;3. Make sure that in the database the last digit of the number is rounded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you create a &lt;STRONG&gt;dataset&lt;/STRONG&gt;&amp;nbsp;in SAS based on what was done in step one, through "Create table ... as select * from dataset_from_step_N1", you can see that numbers less than 9,007,199,254,740,992 (as stated in the documentation) are not rounded.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I am now lost to understand what you are testing. You seem to be saying that it does work correctly.&lt;/P&gt;
&lt;P&gt;Not sure what step 1 above is.&amp;nbsp; SAS only has one type of numbers, floating point numbers.&amp;nbsp; &amp;nbsp;But SAS/Access will normally attempt to define data type in the remote database based on the format attached to the number.&amp;nbsp; What format did you attach to the numbers?&amp;nbsp; I am not sure what format SAS/Access will use when transferring numbers that do not have a format specified.&amp;nbsp; In most other places SAS will default to using BEST12. format.&amp;nbsp; If that happens then you might lose the last few decimal digits of your larger numbers.&amp;nbsp; Also if you specify the format as 16. then perhaps SAS is worried about negative numbers and only used 15 of the digits when sending it to Oracle?&amp;nbsp; What if you use 17. as the the attached SAS format instead?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 15:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653701#M36167</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-05T15:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653723#M36168</link>
      <description>&lt;P&gt;Data uploading works incorrectly according to the following algorithm:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS&amp;nbsp; =&amp;gt;&amp;gt; Oracle DB (round last digit in 16-digit numbers)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I tried to upload data in format 17 as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.test_tbl;
format t1 t2 t3 t4 t5 t6 t7 t8 t9 17.;
t1 = 1111111111111111;
t2 = 2222222222222222;
t3 = 3333333333333333;
t4 = 4444444444444444;
t5 = 5555555555555555;
t6 = 6666666666666666;
t7 = 7777777777777777;
t8 = 8888888888888888;
t9 = 9999999999999999;
run;


proc sql;
create table oracle_lib.test_tbl
AS SELECT * FROM work.test_tbl;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The result is the same:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HULK_0-1591372860637.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40544i1D66E83F34F525F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HULK_0-1591372860637.png" alt="HULK_0-1591372860637.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HULK_1-1591372894135.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/40545iC120E21F788B8528/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HULK_1-1591372894135.png" alt="HULK_1-1591372894135.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;although the format in the database table corresponds to what was specified in SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 16:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653723#M36168</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-05T16:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653768#M36169</link>
      <description>&lt;P&gt;Talk to SAS support. &lt;A href="http://sas.com/support" target="_blank"&gt;http://sas.com/support&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to keep seeing if you can debug it try turning on the logging of the SQL commands the SAS/Access uses to create the table and send the data.&amp;nbsp; Look at the SASTRACE option.&amp;nbsp; Perhaps something like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,ds' sastraceloc=saslog ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jun 2020 19:20:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653768#M36169</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-05T19:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653773#M36170</link>
      <description>&lt;P&gt;What happens if you just tell Oracle to make it a floating point number like it was in SAS?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_tbl;
  input testvar ;
  format testvar F16.;
cards;
111111111111111
2222222222222222
3333333333333333
4444444444444444
5555555555555555
6666666666666666
7777777777777777
8888888888888888
9999999999999999
;
proc sql;
create table oracle_lib.test_tbl(dbtype=(testvar='float'))
AS SELECT testvar FROM test_tbl;
quit;
proc&amp;nbsp;compare&amp;nbsp;data=test_tbl&amp;nbsp;compare= oracle_lib.test_tbl ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jun 2020 19:26:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653773#M36170</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-06-05T19:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653814#M36171</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108513"&gt;@HULK&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From this post, it looks like there's a very important point being missed. As soon as you execute the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.test_tbl;
format t1 t2 t3 t4 t5 t6 t7 t8 t9 17.;
t1 = 1111111111111111;
t2 = 2222222222222222;
t3 = 3333333333333333;
t4 = 4444444444444444;
t5 = 5555555555555555;
t6 = 6666666666666666;
t7 = 7777777777777777;
t8 = 8888888888888888;
t9 = 9999999999999999;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the value for t9 as stored by SAS is incorrect. There's no issues of formats, or anything else. You simply can't reliably store 16 digit numbers like&amp;nbsp;&lt;CODE class=" language-sas"&gt;9999999999999999 &lt;/CODE&gt;&amp;nbsp;accurately in SAS as a numeric data type. It's not SAS, it's the limit of 8 byte floating point. Some of them will be stored correctly, most won't. The instant the&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;t9 = 9999999999999999;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;statement is executed, the value stored by SAS is different, and can never be recovered.&lt;/P&gt;
&lt;P&gt;Here's the relevant document section:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=pgmcli&amp;amp;docsetTarget=p12zsdbylnn6c2n1i48z7djr6uzo.htm&amp;amp;docsetVersion=1.0&amp;amp;locale=en" target="_self"&gt;https://documentation.sas.com/?docsetId=pgmcli&amp;amp;docsetTarget=p12zsdbylnn6c2n1i48z7djr6uzo.htm&amp;amp;docsetVersion=1.0&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2020 22:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653814#M36171</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-06-05T22:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653884#M36172</link>
      <description>The following code return the exact integer the sas could reach biggest.&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;max=constant('exactint');&lt;BR /&gt;put max= best32.;&lt;BR /&gt;run;</description>
      <pubDate>Sat, 06 Jun 2020 11:37:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653884#M36172</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-06T11:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653915#M36173</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108513"&gt;@HULK&lt;/a&gt;&amp;nbsp; or alternately, if you run this code you'll see once the biggest number is created, the addition of 1 is just discarded, as there aren't enough significant digits in the field (thanks for the constant function,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;! I didn't know about it).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	bignum=constant('exactint');
	bignum = bignum - 4;

	do i = 1 to 10;
		bignum = bignum + 1;
		put bignum= best32.;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 18:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653915#M36173</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-06-06T18:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653997#M36176</link>
      <description>&lt;P&gt;My question was not about the largest number sas can work with.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;The question was why 16-digit numbers (for example, var = 1111111111111111, and it is less than the maximum) when loading into Oracle database, rounds the last digit in the number.&lt;BR /&gt;If you have a test database, you can try to reproduce this. In the database, this number will be displayed as 11111111111111111&lt;STRONG&gt;0&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 09:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/653997#M36176</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-07T09:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654000#M36177</link>
      <description>Can you change the variable type in oracle into Integer ,like&lt;BR /&gt;T1    INT(17)&lt;BR /&gt;T2    BIGINT(17)&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;connect to oralce(...)&lt;BR /&gt;execute( create table oracle.want ( T1 BIGINT(17), T2 BIGINT(17), ...... )  )&lt;BR /&gt;by oracle;&lt;BR /&gt;quit;&lt;BR /&gt;proc append base=oracle.want  data=sas.have force;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Or Change the variable format at oracle side , see if the format affect it .</description>
      <pubDate>Sun, 07 Jun 2020 11:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654000#M36177</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-07T11:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654014#M36180</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/108513"&gt;@HULK&lt;/a&gt;&amp;nbsp; My apologies, I just skimmed through the preceding messages, and missed this very important part. The problem of not being able to process numbers in SAS that are larger than the physical limit is a common one, so I just latched on to that. To me, it looks like your example should work, so something isn't working correctly. Unfortunately I don't have access to any Oracle facilities, so I'm afraid I can't contribute further.&lt;/P&gt;
&lt;P&gt;Good luck, and please post back when you find out what the explanation is. I find this problem very interesting!&lt;/P&gt;
&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 15:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654014#M36180</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2020-06-07T15:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654039#M36181</link>
      <description>&lt;P&gt;Unfortunately, this option did not help. The result is the same.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 16:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654039#M36181</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-07T16:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654456#M36183</link>
      <description>As Tom said,Could you use &lt;BR /&gt;options sastrace=',,,ds' sastraceloc=saslog ;&lt;BR /&gt;&lt;BR /&gt;see what exact SQL(in LOG) sas pass into oralce and let oracle DB check this SQL ,why variable would lost its length in oracle ?</description>
      <pubDate>Mon, 08 Jun 2020 11:05:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654456#M36183</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-08T11:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: After loading a 16-digit numerical variable into Oracle, the last character is replaced with 0.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654485#M36184</link>
      <description>&lt;P&gt;Here is an excerpt from the log. I tried to insert two columns T1 = 111111111111111111 and T2 = 111111111111111112&lt;/P&gt;
&lt;P&gt;From suspicious moments, I saw only this in the log:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.&lt;/CODE&gt;&lt;/STRONG&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;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,ds' sastraceloc=saslog ;
27         proc sql;
28         create table test_ma.test_tbl5
29         as select * from work.test;
  0 1591617382 no_name 0 SQL (2) 
ORACLE_1: Prepared: on connection 0 1 1591617382 no_name 0 SQL (2) 
SELECT * FROM TEST_TBL5 2 1591617382 no_name 0 SQL (2) 
  3 1591617382 no_name 0 SQL (2) 
  4 1591617382 no_name 0 SQL (2) 
Summary Statistics for ORACLE are: 5 1591617382 no_name 0 SQL (2) 
Total SQL prepare seconds were:                     0.003498 6 1591617382 no_name 0 SQL (2) 
Total seconds used by the ORACLE ACCESS engine were     0.004462 7 1591617382 no_name 0 SQL (2) 
  8 1591617382 no_name 0 SQL (2) 
  9 1591617382 no_name 0 SQL (2) 
ORACLE_2: Prepared: on connection 1 10 1591617382 no_name 0 SQL (2) 
SELECT * FROM TEST_TBL5 11 1591617382 no_name 0 SQL (2) 
  12 1591617382 no_name 0 SQL (2) 
  13 1591617382 no_name 0 SQL (2) 
Summary Statistics for ORACLE are: 14 1591617382 no_name 0 SQL (2) 
Total SQL prepare seconds were:                     0.001377 15 1591617382 no_name 0 SQL (2) 
Total seconds used by the ORACLE ACCESS engine were     0.001772 16 1591617382 no_name 0 SQL (2) 
  17 1591617382 no_name 0 SQL (2) 
NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
  18 1591617382 no_name 0 SQL (2) 
ORACLE_3: Executed: on connection 2 19 1591617382 no_name 0 SQL (2) 
CREATE TABLE TEST_TBL5(T1 NUMBER ,T2 NUMBER ) 20 1591617382 no_name 0 SQL (2) 
  21 1591617382 no_name 0 SQL (2) 
  22 1591617382 no_name 0 SQL (2) 
ORACLE_4: Prepared: on connection 2 23 1591617382 no_name 0 SQL (2) 
INSERT  INTO TEST_TBL5 (T1,T2) VALUES (:T1,:T2) 24 1591617382 no_name 0 SQL (2) 
  25 1591617382 no_name 0 SQL (2) 
  26 1591617382 no_name 0 SQL (2) 
2                                                          The SAS System                                 14:53 Monday, June 8, 2020

ORACLE_5: Executed: on connection 2 27 1591617382 no_name 0 SQL (2) 
INSERT statement  ORACLE_4 28 1591617382 no_name 0 SQL (2) 
  29 1591617382 no_name 0 SQL (2) 
ORACLE:  *-*-*-*-*-*-* COMMIT *-*-*-*-*-*-* 30 1591617382 no_name 0 SQL (2) 
  31 1591617382 no_name 0 SQL (2) 
Summary Statistics for ORACLE are: 32 1591617382 no_name 0 SQL (2) 
Total SQL execution seconds were:                   0.047399 33 1591617382 no_name 0 SQL (2) 
Total SQL prepare seconds were:                     0.001399 34 1591617382 no_name 0 SQL (2) 
Total SQL row insert seconds were:                  0.016397 35 1591617382 no_name 0 SQL (2) 
Total seconds used by the ORACLE ACCESS engine were     0.068465 36 1591617382 no_name 0 SQL (2) 
  37 1591617382 no_name 0 SQL (2) 
NOTE: Table TEST_MA.TEST_TBL5 created, with 1 rows and 2 columns.

30         quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.18 seconds
      cpu time            0.03 seconds&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 12:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/After-loading-a-16-digit-numerical-variable-into-Oracle-the-last/m-p/654485#M36184</guid>
      <dc:creator>HULK</dc:creator>
      <dc:date>2020-06-08T12:01:33Z</dc:date>
    </item>
  </channel>
</rss>

