<?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: Issue with proc sql truncating data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568877#M160232</link>
    <description>&lt;P&gt;Not sure if this will run as I don't have access to your database (to test it out) but worth a try. Replace ABC, DEF and GHI, below, appropriately.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;
connect to odbc as mycon
   (datasrc=ABC user=DEF password=GHI);

select *
   from connection to mycon
      &lt;SPAN class="codeFocus"&gt;(Your Raw SQL query here&lt;/SPAN&gt;&lt;SPAN class="codeFocus"&gt;)&lt;/SPAN&gt;;

disconnect from mycon;
quit;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Try some simple query like fetching a column which has more than 80 characters in its contents&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2019 17:58:47 GMT</pubDate>
    <dc:creator>koyelghosh</dc:creator>
    <dc:date>2019-06-25T17:58:47Z</dc:date>
    <item>
      <title>Issue with proc sql truncating data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568849#M160219</link>
      <description>&lt;P&gt;Hello.&amp;nbsp; I pulling data from a cache database.&amp;nbsp; Upon execution of the query the field I need is being truncated to 80 characters.&amp;nbsp; I have tried setting the length, informat, and format on the pull but no success.&amp;nbsp; Code is below.&amp;nbsp; I would appreciate any suggestions on how to have it read in the full value.&amp;nbsp; I have tried the pull with other SQL tools and can pull the full value with no setting or options added.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname k odbc dsn=Kaiser1 schema=SqLUSeR readbuff=10000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table calls1a as&lt;BR /&gt;select t1.Name_Of_VTrak_File informat $2000. format $2000. length=2000 as Name_Of_VTrak_Filez&lt;BR /&gt;from k.call_logging_audit(dbkey=Date_Call_Began) t1&lt;BR /&gt;where Date_Call_Began = &amp;amp;start. and Recorded_Voicetrak=1;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 16:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568849#M160219</guid>
      <dc:creator>Erockanderson</dc:creator>
      <dc:date>2019-06-25T16:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with proc sql truncating data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568853#M160222</link>
      <description>&lt;P&gt;Similar issue has been discussed here (&lt;A href="https://communities.sas.com/t5/SAS-Procedures/character-length-in-proc-sql-versus-data-step/td-p/259427" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/character-length-in-proc-sql-versus-data-step/td-p/259427&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you try using DATA step. If DATA step is working, then the ODBC is not truncating anything before passing it to SAS. Otherwise may be it is your ODBC settings that is truncating the value to 80 characters before it reaches SAS for processing. This is my guess.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 16:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568853#M160222</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-06-25T16:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with proc sql truncating data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568873#M160229</link>
      <description>I get the same results when running as a data step. 80 characters. How&lt;BR /&gt;would I go about seeing if the odbc settings are limiting the length. This&lt;BR /&gt;field in particular was lengthened recently due to an upgrade of the&lt;BR /&gt;system. Does SAS store database characteristics it could be defaulting to&lt;BR /&gt;somewhere?&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jun 2019 17:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568873#M160229</guid>
      <dc:creator>Erockanderson</dc:creator>
      <dc:date>2019-06-25T17:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with proc sql truncating data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568877#M160232</link>
      <description>&lt;P&gt;Not sure if this will run as I don't have access to your database (to test it out) but worth a try. Replace ABC, DEF and GHI, below, appropriately.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sql;
connect to odbc as mycon
   (datasrc=ABC user=DEF password=GHI);

select *
   from connection to mycon
      &lt;SPAN class="codeFocus"&gt;(Your Raw SQL query here&lt;/SPAN&gt;&lt;SPAN class="codeFocus"&gt;)&lt;/SPAN&gt;;

disconnect from mycon;
quit;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Try some simple query like fetching a column which has more than 80 characters in its contents&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2019 17:58:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-sql-truncating-data/m-p/568877#M160232</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-06-25T17:58:47Z</dc:date>
    </item>
  </channel>
</rss>

