<?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: first row exceed 32767, lrecl not work in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217390#M53480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, this is exactly what I want!!! Thank you so much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 21:37:18 GMT</pubDate>
    <dc:creator>abcd123</dc:creator>
    <dc:date>2015-08-07T21:37:18Z</dc:date>
    <item>
      <title>first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217384#M53474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to import a csv file; first row contains variable names, and there are 10000 or so variables. My code look like following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;filename foo 'C:\Users\Desktop\aaaa_2.txt' lrecl=100000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;PROC IMPORT OUT= WORK.ABC &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= foo &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=TAB REPLACE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAROW=2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I specified lrecl in the code, the generated variable names are still messed (not showing correct name, but just "VAR3526", "VAR3527" etc) . Here are the log message I got:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;EFI will truncate records &amp;gt; 32767; your record length was 100000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Number of names found is less than number of variables found.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems SAS still truncates after 32767 characters. Why lrecl not work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 17:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217384#M53474</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2015-08-05T17:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217385#M53475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are likely several work arounds for the lrecl issue but PROC IMPORT, which is not a very "bright" program may not recognize all of them.&lt;/P&gt;&lt;P&gt;One:&lt;/P&gt;&lt;P&gt;options LRECL= 100K;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Number of names found is less than number of variables found.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Tells us that some of your columns do not have headings to use as a variable name.&lt;/P&gt;&lt;P&gt;This will cause variables that do not have column headings to get names like VARxxxx where xxxx is the variable column number.&lt;/P&gt;&lt;P&gt;Also if your column headings exceed 32 characters and duplicate each other this may happen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 17:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217385#M53475</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-05T17:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217386#M53476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I tried to set options LRECL= 100K, however I got following error message: Option value for SAS option LRECL must be between 1 and 32767.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition , I checked my variable headings and all variable name length are less than 32. So it seems that&amp;nbsp; it is the 32767 restriction that cause the problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 18:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217386#M53476</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2015-08-05T18:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217387#M53477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you press F4 to copy these code generated by proc import.&lt;/P&gt;&lt;P&gt;And paste it in a new editor window and change that LRECL=&amp;nbsp; by hand ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And from your log. It seems that it is not error about LRECL= , it is about the sas code .&lt;/P&gt;&lt;P&gt;Are you sure you specify the right delimiter ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 13:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217387#M53477</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-08-06T13:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217388#M53478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;10,000 variables, seriously?&amp;nbsp; I would advise you look at the export process as that is a very high amount, databases wouldn't generally be happy with that amount of variables, nor would any other application.&amp;nbsp; I would suggest the data be normalised before export, or be split up into manageable chunks, i.e. split out into various datasets with a linked id.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 13:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217388#M53478</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-06T13:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217389#M53479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Write the code to read it yourself.&amp;nbsp; If you have no documentation on the variables then read them as character and analyze them in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile 'C:\Users\Desktop\aaaa_2.txt' dsd lrecl=1000000 truncover firstobs=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length var00001-var10000 $20 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input var00001-var10000 ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read the names separately ;&lt;/P&gt;&lt;P&gt;data names ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length varname realname $32 ;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp; infile 'C:\Users\Desktop\aaaa_2.txt' dsd lrecl=1000000 truncover obs=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input realname @@ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; varname = 'VAR' || put(_n_,Z5.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 13:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217389#M53479</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-06T13:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: first row exceed 32767, lrecl not work</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217390#M53480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, this is exactly what I want!!! Thank you so much!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 21:37:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/first-row-exceed-32767-lrecl-not-work/m-p/217390#M53480</guid>
      <dc:creator>abcd123</dc:creator>
      <dc:date>2015-08-07T21:37:18Z</dc:date>
    </item>
  </channel>
</rss>

