<?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: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651060#M195294</link>
    <description>&lt;P&gt;we are trying to automate data pull process from Oracle to SAS. Do we have any way to handle thru SAS?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 May 2020 12:14:35 GMT</pubDate>
    <dc:creator>ez123</dc:creator>
    <dc:date>2020-05-27T12:14:35Z</dc:date>
    <item>
      <title>How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/649621#M194791</link>
      <description>&lt;P&gt;I have issue when reading CLOB values that are greater than 32767 characters in length in oracle table thru SAS. For example, I have to read a record's CLOB value which has a length = 70000. I am using DBMAX_TEXT=32767 statement in the option, but the value are got truncated after 32767. Please someone help me how do we get values without truncate thru sas.&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2020 15:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/649621#M194791</guid>
      <dc:creator>ez123</dc:creator>
      <dc:date>2020-05-21T15:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/649878#M194861</link>
      <description>32767 is the max length of character variable in sas . It is sas limitation .&lt;BR /&gt;Try dump the oracle table into a csv file ,and import it via data step ?</description>
      <pubDate>Fri, 22 May 2020 12:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/649878#M194861</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-05-22T12:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651060#M195294</link>
      <description>&lt;P&gt;we are trying to automate data pull process from Oracle to SAS. Do we have any way to handle thru SAS?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 12:14:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651060#M195294</guid>
      <dc:creator>ez123</dc:creator>
      <dc:date>2020-05-27T12:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651067#M195297</link>
      <description>Can you let Oracle DB do it ?&lt;BR /&gt;First, use  TOCHAR(clob_variable) to change it into a string, &lt;BR /&gt;and split it into multiple variables &lt;BR /&gt;and import these variables into SAS ?</description>
      <pubDate>Wed, 27 May 2020 12:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651067#M195297</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-05-27T12:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651069#M195299</link>
      <description>&lt;P&gt;And&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp; maybe have good ideas.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 12:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651069#M195299</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-05-27T12:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651091#M195311</link>
      <description>&lt;P&gt;I think that you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;mentioned the options that I can think of&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 13:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651091#M195311</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2020-05-27T13:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651214#M195361</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/204379"&gt;@ez123&lt;/a&gt;&amp;nbsp;- What is actually stored in the CLOB? Is it structured data or not? If it is non-structured then that makes it hard to split it into usable chunks.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 20:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651214#M195361</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-05-27T20:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651257#M195381</link>
      <description>&lt;P&gt;You need to use pass thru code so you can call the Oracle function DBMS_LOB.SUBSTR(), which is lot like the SAS SUBSTR() function except the start position and length have swapped places and it counts by CHARACTERs instead of BYTES, to break the CLOB into pieces.&amp;nbsp; Make sure to take fewer than 32767 characters in each piece to allow some room for multi-byte characters.&amp;nbsp; For example you might decide to split your 70K clob into strings of lengths 24K,24K and 22K.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
  connect to oracle ... ;
  create table want as select * from connection to oracle (
select a.var1
     , a.var2
     , DBMS_LOB.SUBSTR(a.clob_var,24000,1) as clob1
     , DBMS_LOB.SUBSTR(a.clob_var,24000,24001) as clob2
     , DBMS_LOB.SUBSTR(a.clob_var,22000,48001) as clob3
from mytable a
  );
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 01:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651257#M195381</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-05-28T01:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651585#M195509</link>
      <description>&lt;P&gt;that field have json format data&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 23:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651585#M195509</guid>
      <dc:creator>ez123</dc:creator>
      <dc:date>2020-05-28T23:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651587#M195511</link>
      <description>&lt;P&gt;Thank you!!!&lt;/P&gt;&lt;P&gt;I am using exactly same as like example but getting below error . Even i am using&amp;nbsp;dbmax_text=32767.&lt;/P&gt;&lt;P&gt;ERROR: ORACLE execute error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small&lt;BR /&gt;ORA-06512: at line 1.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 23:21:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651587#M195511</guid>
      <dc:creator>ez123</dc:creator>
      <dc:date>2020-05-28T23:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651601#M195519</link>
      <description>&lt;P&gt;Please post your complete SAS log including code.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 00:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651601#M195519</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-05-29T00:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651629#M195533</link>
      <description>&lt;P&gt;Maybe ?&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt; cast(DBMS_LOB.SUBSTR(a.clob_var,24000,1) as varchar(32767)) as clob1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 May 2020 05:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651629#M195533</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-05-29T05:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651704#M195564</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;connect to oracle ( user="XXXX" password="SSSSS"&lt;BR /&gt;path="path" dbmax_text=32767);&lt;BR /&gt;create table in1.test1 as select * from connection to oracle&lt;BR /&gt;( select DBMS_LOB.SUBSTR(a.field,32000,1) as clob1&lt;BR /&gt;, DBMS_LOB.SUBSTR(a.field,32000,32001) as clob2&lt;BR /&gt;from schema.mytable a);&lt;BR /&gt;disconnect from oracle;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2020 13:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/651704#M195564</guid>
      <dc:creator>ez123</dc:creator>
      <dc:date>2020-05-29T13:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do read CLOB values which has length greater than 32767 in Oracle table thru SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/706619#M216885</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19789" target="_blank"&gt;@Abraham&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following Oracle function can be useful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;
  connect to oracle ... ;
  create table want as select * from connection to oracle (
select 
&lt;STRONG&gt;regexp_replace(clob_var), '[[:space:]]+', chr(4000)) as new_var,&lt;/STRONG&gt;
from mytable a
  );
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 12:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-read-CLOB-values-which-has-length-greater-than-32767-in/m-p/706619#M216885</guid>
      <dc:creator>TET_34</dc:creator>
      <dc:date>2020-12-17T12:52:49Z</dc:date>
    </item>
  </channel>
</rss>

