<?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: Truncation Varchar in passthrough in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293651#M61176</link>
    <description>&lt;PRE&gt;
Ha. Maybe you import that table correctly, but FORMAT is wrong , Try assign another format like $200.

or remove all the format and see what happened.

proc datasets library=work nolist nodetails;
 modify have;
 attrib _all_ format= ;
quit;

&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Aug 2016 09:55:00 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-08-24T09:55:00Z</dc:date>
    <item>
      <title>Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293413#M61064</link>
      <description>&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;I'm trying to create a dataset with an explicit pass through.&lt;/P&gt;&lt;P&gt;The DB is a cachè DB from Intersystems but I have only a stored procedure that return a table.&lt;/P&gt;&lt;P&gt;Every field in the table obtained by stored procedure is a VarChar(50).&lt;/P&gt;&lt;P&gt;Every field in select * from connection to odbc (...) returned in the SAS dataset has length, informat and format = 50.&lt;/P&gt;&lt;P&gt;But I have some fields more than length = 50.&lt;/P&gt;&lt;P&gt;How could I resolve this issue with the stored procedure query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 13:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293413#M61064</guid>
      <dc:creator>AsSASsin</dc:creator>
      <dc:date>2016-08-23T13:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293417#M61066</link>
      <description>&lt;P&gt;Not sure if I understand.&lt;/P&gt;
&lt;P&gt;Isn't the restriction to 50 chars in the stored procedure? Or where&amp;nbsp;can your get longer strings...?&lt;/P&gt;
&lt;P&gt;Please elaborate...&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 13:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293417#M61066</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-23T13:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293463#M61080</link>
      <description>&lt;P&gt;May not hurt to show the code involved.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 15:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293463#M61080</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-23T15:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293485#M61084</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code is this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;CONNECT TO odbc(dsn=Mydsn);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CREATE mytable AS SELECT * FROM CONNECTION TO odbc&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call InterSystems_storedProc&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DISCONNECT FROM odbc;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "call" command give me a table with the field's lengths of the varchar in the database (every field returned by the stored procedure is varchar (50) ).&lt;/P&gt;&lt;P&gt;Some fields have the length = 52, but my sas dataset take the length = 50 with 2 bytes truncation.&lt;/P&gt;&lt;P&gt;Is there a solution to avoid truncation and set the length with a greater value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 16:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293485#M61084</guid>
      <dc:creator>AsSASsin</dc:creator>
      <dc:date>2016-08-23T16:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293608#M61151</link>
      <description>&lt;PRE&gt;
Not sure. libname's option ?

 dbmax_text=32767

&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 03:06:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293608#M61151</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-24T03:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293627#M61158</link>
      <description>&lt;P&gt;I tried dbmax_text but nothing, this option doesn't work.&lt;/P&gt;&lt;P&gt;I inserted dbmax_text option after dsn...tried with fields in select setting length, informat and format but nothing.&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 05:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293627#M61158</guid>
      <dc:creator>AsSASsin</dc:creator>
      <dc:date>2016-08-24T05:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293651#M61176</link>
      <description>&lt;PRE&gt;
Ha. Maybe you import that table correctly, but FORMAT is wrong , Try assign another format like $200.

or remove all the format and see what happened.

proc datasets library=work nolist nodetails;
 modify have;
 attrib _all_ format= ;
quit;

&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 09:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293651#M61176</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-24T09:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293728#M61205</link>
      <description>&lt;P&gt;Hi! Thank you for your&amp;nbsp;reply.&lt;/P&gt;&lt;P&gt;I tried with your suggestion, but it is the same.&lt;/P&gt;&lt;P&gt;Some variables are truncated...I think that this happens inside the pass through...assign format or informat after that the SAS table is&amp;nbsp;made is useless.&lt;/P&gt;&lt;P&gt;Is it possible that a pass through hasn't an option for the varchar types?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:45:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293728#M61205</guid>
      <dc:creator>AsSASsin</dc:creator>
      <dc:date>2016-08-24T14:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293761#M61213</link>
      <description>&lt;P&gt;Can you show the results of Proc Contents on the Mytable SAS dataset?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 15:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293761#M61213</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-24T15:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293914#M61273</link>
      <description>&lt;PRE&gt;
1)
That is really weird. Did you get any warning msg in LOG ? 
or Can you copy a brand new table without format , label ..... 
Like:
create table new as
select * from old

 and import again ,see what happen .


2)
Alternative way to expand the length of variable is using CVP engine :

libname x cvp 'c:\temp\';
proc copy in=DB out=x noclone;
 select old_table;
run;




And It is a good time to talk with sas support .
&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2016 01:49:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293914#M61273</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-25T01:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293965#M61301</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you tell me how can I contact the SAS support?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 08:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293965#M61301</guid>
      <dc:creator>AsSASsin</dc:creator>
      <dc:date>2016-08-25T08:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Truncation Varchar in passthrough</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293987#M61306</link>
      <description>I remember there is a URL in  support.sas.com , which you can use to report your question. Also you could talk to your local SAS agent. That might give you a little fast.</description>
      <pubDate>Thu, 25 Aug 2016 11:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Truncation-Varchar-in-passthrough/m-p/293987#M61306</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-08-25T11:54:38Z</dc:date>
    </item>
  </channel>
</rss>

