<?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: lrecl option in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280926#M56859</link>
    <description>&lt;P&gt;This is&amp;nbsp;&lt;U&gt;not&lt;/U&gt; the log, just part of the code.&lt;/P&gt;
&lt;P&gt;To help you, we need the whole log of the data step including the ERROR message.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 21:09:22 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-06-28T21:09:22Z</dc:date>
    <item>
      <title>lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280778#M56798</link>
      <description>&lt;P&gt;I need to read a large dataset, infile from *.dat&lt;/P&gt;&lt;P&gt;I set irecl=32767 the maxim value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the log showed&lt;/P&gt;&lt;P&gt;The minimum record length was 20000.&lt;/P&gt;&lt;P&gt;The maximum record length was 20000.&lt;/P&gt;&lt;P&gt;and for the date, the log showed a warning&lt;/P&gt;&lt;P&gt;"has already been defined as numeric"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice how to change irecl to the right value?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 13:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280778#M56798</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-28T13:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280793#M56806</link>
      <description>&lt;P&gt;Show log (with relevant code). LRECL is not the reason for the WARNING.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 14:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280793#M56806</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-28T14:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280880#M56843</link>
      <description>&lt;P&gt;you are right.&lt;/P&gt;&lt;P&gt;I find sas stops before the varible "date", so I format the date, then there is a warning&lt;/P&gt;&lt;P&gt;it seems not necessary to format&lt;/P&gt;&lt;P&gt;all are charcters, no delimiters, a lot of space, so I have all the code with the location and length of the variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;INFILE 'c:\abc.DAT' truncover lrecl=30000

obs=300;

   INPUT  
@59 id $1.		@139 fname4 $4.	..
@11593 cdc $8.;
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Jun 2016 19:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280880#M56843</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-28T19:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280881#M56844</link>
      <description>&lt;P&gt;I adjusted irecl from 20000 to the maxim, the record is 20000&lt;/P&gt;&lt;P&gt;but it dos not read right for the rest part&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 19:24:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280881#M56844</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-28T19:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280926#M56859</link>
      <description>&lt;P&gt;This is&amp;nbsp;&lt;U&gt;not&lt;/U&gt; the log, just part of the code.&lt;/P&gt;
&lt;P&gt;To help you, we need the whole log of the data step including the ERROR message.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 21:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280926#M56859</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-28T21:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280932#M56862</link>
      <description>&lt;P&gt;so your code reads:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format DATE date9.;
input  ....   DATE $8. .... ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well the error is exactly was it says: you have defined the variable as numeric (with the format statement) and then you want to read it as a string.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Formatting the date will not force reading its value. You have to look at where in the record&amp;nbsp;the reading stops and why. One way to do it is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile ... lrecl=30000 pad truncover;
input X $30000.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then use substr() to analyse the contents of X (use _infile_ instead of X if you know about&amp;nbsp;_infile_, otherwise just use the X variable to do your investigation).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 22:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280932#M56862</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-28T22:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280936#M56865</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;I tried yours. it does not change, still it cant not read the rest part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5 records were read from the infile&lt;/P&gt;&lt;P&gt;' c:\abc.DAT'.&lt;/P&gt;&lt;P&gt;The minimum record length was 20000.&lt;/P&gt;&lt;P&gt;The maximum record length was 20000.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.CONTEST has 5 observations and 213 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.17 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.07 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 22:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280936#M56865</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-28T22:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280937#M56866</link>
      <description>&lt;P&gt;see my log below, please&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 22:44:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280937#M56866</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-28T22:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280947#M56872</link>
      <description>&lt;P&gt;1) How long is your text file record length? At least 20k it seems;&amp;nbsp;try using lrecl=32767&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) What's the position of the date in the record?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 23:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280947#M56872</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-28T23:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280981#M56890</link>
      <description>&lt;P&gt;To repeat myself:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To help you, we need the whole log of the data step including the ERROR message.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Whole log means "including the code that caused the ERROR".&lt;/P&gt;
&lt;P&gt;Just copy/paste from the log; it's not rocket science.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 05:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/280981#M56890</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-06-29T05:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/281145#M56954</link>
      <description>&lt;P&gt;I do not understand that, "What's the position of the date in the record?"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have adjusted the value of lrecl, with many different values, it did not work&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:42:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/281145#M56954</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-06-29T15:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: lrecl option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/281312#M57025</link>
      <description>&lt;P&gt;"What's the position of the date in the record?"&amp;nbsp; means: how many characters do you have to count on your text input record before the date is found?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 23:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lrecl-option/m-p/281312#M57025</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-29T23:34:27Z</dc:date>
    </item>
  </channel>
</rss>

