<?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 Insert data from SAS VIYA CAS table to DB2 table in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977721#M3000</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using SAS VIYA LTS 2025.03.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a number of large tables in CAS and I need to insert the content into DB2 tables.&amp;nbsp; The tables can not be moved from CAS to SPRE because some of the columns are quite large and will get truncated (these large columns correcpond to BLOB and CLOB Db2 data types)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone accomplished this before?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Smm662002&lt;/P&gt;</description>
    <pubDate>Fri, 24 Oct 2025 15:00:11 GMT</pubDate>
    <dc:creator>smm662002</dc:creator>
    <dc:date>2025-10-24T15:00:11Z</dc:date>
    <item>
      <title>Insert data from SAS VIYA CAS table to DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977721#M3000</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using SAS VIYA LTS 2025.03.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a number of large tables in CAS and I need to insert the content into DB2 tables.&amp;nbsp; The tables can not be moved from CAS to SPRE because some of the columns are quite large and will get truncated (these large columns correcpond to BLOB and CLOB Db2 data types)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone accomplished this before?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Smm662002&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 15:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977721#M3000</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2025-10-24T15:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data from SAS VIYA CAS table to DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977810#M3001</link>
      <description>&lt;P&gt;According to this &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_068/casref/p1gzozk1eopeirn1mr0knqofu73t.htm" target="_blank" rel="noopener"&gt;SAS doc&lt;/A&gt; it is possible using PROC CASUTIL.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 21:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977810#M3001</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-10-24T21:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data from SAS VIYA CAS table to DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977868#M3002</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your answer. Based on the documentation it seems to be possible. I have tried to use proc casutil, but I couldn't create a DB2 table but only a CAS table in a DB2 CASLIB.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you think it might be the right casutil syntax for the scenario: source VIYA CAS table and target DB2 table?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;smm662002&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2025 09:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/977868#M3002</guid>
      <dc:creator>smm662002</dc:creator>
      <dc:date>2025-10-27T09:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data from SAS VIYA CAS table to DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/978047#M3010</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1962"&gt;@smm662002&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Let the DBA's create the table and try uploading. Make sure you have all the required permissions.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2025 00:26:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/978047#M3010</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2025-10-29T00:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Insert data from SAS VIYA CAS table to DB2 table</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/978053#M3011</link>
      <description>&lt;P&gt;Google gives me this answer which I suggest you try (I don't have Viya to try):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;caslib mydbreflib desc='My Relational Database CASLIB'
        dataSource=(srctype='&amp;lt;database_type&amp;gt;', /* e.g., 'oracle', 'postgres', 'teradata' */
                    server='&amp;lt;database_server_address&amp;gt;',
                    username='&amp;lt;database_username&amp;gt;',
                    password='&amp;lt;database_password&amp;gt;',
                    database='&amp;lt;database_name&amp;gt;');

    proc casutil;
        save casdata="&amp;lt;cas_table_name&amp;gt;" /* Name of the CAS table to save */
             outcaslib=mydbreflib /* CASLIB connected to your relational database */
             casout="&amp;lt;target_table_name&amp;gt;" /* Name for the table in the relational database */
             replace; /* Optional: Overwrites the target table if it exists */
    quit;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Oct 2025 01:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Insert-data-from-SAS-VIYA-CAS-table-to-DB2-table/m-p/978053#M3011</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-10-29T01:56:56Z</dc:date>
    </item>
  </channel>
</rss>

