<?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: Char length being truncated in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448192#M112723</link>
    <description>&lt;P&gt;Unfortunately that didn't work either&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 15:28:05 GMT</pubDate>
    <dc:creator>HN2001</dc:creator>
    <dc:date>2018-03-23T15:28:05Z</dc:date>
    <item>
      <title>Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/447945#M112610</link>
      <description>&lt;P&gt;I have a column in excel that exceeds 255.&amp;nbsp; When I read the data in and use dbsastype to force the column char and length, it still gives me 255.&amp;nbsp; Any ideas of what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME WrkBk EXCEL "file" MIXED=YES;&lt;/P&gt;&lt;P&gt;DATA test.;&lt;BR /&gt;SET WrkBk."sh1"n(&lt;BR /&gt;DBSASTYPE=("f1"='char(450)'));&lt;BR /&gt;RUN;&lt;BR /&gt;LIBNAME WrkBk CLEAR;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 20:58:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/447945#M112610</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-03-22T20:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/447958#M112613</link>
      <description>&lt;P&gt;Have you tried it with dbms=xlsx. Unfortunately, it doesn't allow mixed and dbsastype, but often does what one wants. e.g.:&lt;/P&gt;
&lt;PRE&gt;LIBNAME WrkBk xlsx "/folders/myfolders/book1.xlsx";

DATA test;
  SET WrkBk.sheet1;
RUN;

LIBNAME WrkBk CLEAR;&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 21:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/447958#M112613</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-03-22T21:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/447961#M112614</link>
      <description>&lt;P&gt;Take control. Save the data to a csv file and read that with a data step. The Excel file format is unusable as a reliable transport.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 21:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/447961#M112614</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-22T21:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448151#M112703</link>
      <description>&lt;P&gt;Try another option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME WrkBk EXCEL "file" MIXED=YES dbmax_text=32767 ;

DATA test;
SET WrkBk."sh1"n;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Mar 2018 13:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448151#M112703</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-23T13:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448192#M112723</link>
      <description>&lt;P&gt;Unfortunately that didn't work either&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448192#M112723</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-03-23T15:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448193#M112724</link>
      <description>I ended up resorting back to a proc import statement and then setting the length in a data step that followed the proc import. From googling, I think there are limitations with the libname excel and libname xlsx.</description>
      <pubDate>Fri, 23 Mar 2018 15:30:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448193#M112724</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-03-23T15:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448196#M112727</link>
      <description>I did try that and it didn't work. I needed to be able to set the length because I was reading in multiple files with a macro around that libname statement and of course the lengths in each file were different. I think there are limitations with xlsx and the length of the variable. I ended up reading in the data with a proc import and setting the length in a data step. Thanks for your suggestion&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Mar 2018 15:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448196#M112727</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-03-23T15:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Char length being truncated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448198#M112729</link>
      <description>I agree I am definitely seeing limitations with libname excel and libname xlsx, even using proc import I see variations in how the data is read in with xlsx and excel</description>
      <pubDate>Fri, 23 Mar 2018 15:33:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Char-length-being-truncated/m-p/448198#M112729</guid>
      <dc:creator>HN2001</dc:creator>
      <dc:date>2018-03-23T15:33:49Z</dc:date>
    </item>
  </channel>
</rss>

