<?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: Crating DB2 table in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260439#M7110</link>
    <description>&lt;P&gt;Is it numerical or char?&lt;/P&gt;
&lt;P&gt;If numerical, you may hit the default max size for the mapped data type in DB2.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,d' sastraceloc=saslog nostsuffix msglevel=i;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Mar 2016 14:53:11 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-03-31T14:53:11Z</dc:date>
    <item>
      <title>Creating DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260410#M7107</link>
      <description>&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN&gt;I'm trying to&lt;/SPAN&gt; &lt;SPAN class=""&gt;create a table in&lt;/SPAN&gt; &lt;SPAN class=""&gt;DB2,&lt;/SPAN&gt; &lt;SPAN&gt;but&lt;/SPAN&gt; &lt;SPAN&gt;the variable&lt;/SPAN&gt; &lt;SPAN&gt;has 14&lt;/SPAN&gt; &lt;SPAN&gt;positions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With variable&lt;/SPAN&gt; &lt;SPAN&gt;with&lt;/SPAN&gt; &lt;SPAN class=""&gt;size&lt;/SPAN&gt; &lt;SPAN&gt;below 9&lt;/SPAN&gt; &lt;SPAN&gt;I have no problems&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But&lt;/SPAN&gt; &lt;SPAN&gt;when caught&lt;/SPAN&gt; &lt;SPAN class=""&gt;variables&lt;/SPAN&gt; &lt;SPAN&gt;above that&lt;/SPAN&gt; &lt;SPAN&gt;length&lt;/SPAN&gt; &lt;SPAN&gt;I get the&lt;/SPAN&gt; &lt;SPAN class=""&gt;following error:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;ERROR: Error attempting to CREATE a DBMS table. ERROR: CLI execute error: [IBM][CLI Driver][DB2] SQL0104N&amp;nbsp; An unexpected token "(" &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; was found following "".&amp;nbsp; Expected tokens may include:&amp;nbsp; "FIELDPROC CHECK GENERATED IMPLICITLY INLINE CONSTRAINT PRIMARY". &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLSTATE=42601 .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; create table db2lib.test2 as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1&lt;BR /&gt;&amp;nbsp;from&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; work.test ;&lt;BR /&gt;quit;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV dir="ltr" style="zoom: 1;"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;max size of var1 is 99999999911119.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260410#M7107</guid>
      <dc:creator>JoaoM</dc:creator>
      <dc:date>2016-03-31T14:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: Crating DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260411#M7108</link>
      <description>&lt;P&gt;Did you try&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data db2lib.test2;
set work.test;
keep var1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:01:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260411#M7108</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-03-31T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Crating DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260415#M7109</link>
      <description>&lt;P&gt;Same error&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:07:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260415#M7109</guid>
      <dc:creator>JoaoM</dc:creator>
      <dc:date>2016-03-31T14:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Crating DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260439#M7110</link>
      <description>&lt;P&gt;Is it numerical or char?&lt;/P&gt;
&lt;P&gt;If numerical, you may hit the default max size for the mapped data type in DB2.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options sastrace=',,,d' sastraceloc=saslog nostsuffix msglevel=i;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260439#M7110</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-31T14:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Crating DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260609#M7112</link>
      <description>&lt;P&gt;It looks like the column is (per default) defined as integer in DB/2, where you have a range of -2147483648 to +2147483647.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing that came to my mind was to use PROC DS2 and define the column as BIGINT or FLOAT.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 05:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260609#M7112</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-04-01T05:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Crating DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260665#M7130</link>
      <description>&lt;P&gt;When numerical&amp;nbsp;variable become&amp;nbsp;this large, on can ask if they really need to be integers - are they par of calculations?&lt;/P&gt;
&lt;P&gt;Another option is to use data set options to explicitly specify data types in the target database (DBTYPE).&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 10:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Creating-DB2-table/m-p/260665#M7130</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-04-01T10:35:44Z</dc:date>
    </item>
  </channel>
</rss>

