<?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 record length in sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492564#M129451</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename sample1 'L\Common\new1.txt';

filename fixed 'L\Common\new2.txt';

data _null_;

  retain maxp 8 p 0;

  infile sample1;

  file fixed lrecl=4000;

  input ;

  if p then put ' ' @;

  put _infile_ @;

  p+countc(_infile_,'#');

 

  if p&amp;gt;= maxp then do ;

    put ;

    p=0;

  end;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running above code aand I have used LRECL=4000 to write into a text file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when&amp;nbsp; i see the log maximum record length is 1473&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: 16767 records were read from the infile SAMPLE1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The minimum record length was 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The maximum record length was 200.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: 1596 records were written to the file FIXED.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The minimum record length was 125.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The maximum record length was 1473.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: DATA statement used (Total process time):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;real time 0.06 seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cpu time 0.03 seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i increase the record length&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Sep 2018 08:50:44 GMT</pubDate>
    <dc:creator>shubham1</dc:creator>
    <dc:date>2018-09-05T08:50:44Z</dc:date>
    <item>
      <title>record length in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492564#M129451</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename sample1 'L\Common\new1.txt';

filename fixed 'L\Common\new2.txt';

data _null_;

  retain maxp 8 p 0;

  infile sample1;

  file fixed lrecl=4000;

  input ;

  if p then put ' ' @;

  put _infile_ @;

  p+countc(_infile_,'#');

 

  if p&amp;gt;= maxp then do ;

    put ;

    p=0;

  end;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running above code aand I have used LRECL=4000 to write into a text file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when&amp;nbsp; i see the log maximum record length is 1473&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: 16767 records were read from the infile SAMPLE1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The minimum record length was 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The maximum record length was 200.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: 1596 records were written to the file FIXED.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The minimum record length was 125.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The maximum record length was 1473.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE: DATA statement used (Total process time):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;real time 0.06 seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cpu time 0.03 seconds&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i increase the record length&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 08:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492564#M129451</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-09-05T08:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: record length in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492681#M129512</link>
      <description>&lt;P&gt;The answer likely lies in your data.&amp;nbsp; The log tells you that the minimum record length being read is 1 character long.&amp;nbsp; This tells me that you have some lines of data that contain just #.&amp;nbsp; They won't take up very much space, but they will add to your calculated value for P.&amp;nbsp; So it's either time to correct the data, or it's time to reformulate how you calculate when another line will fit onto the current line.&amp;nbsp; SAS contains plenty of tools to do this, such as an option on the FILE statement to track your current position on the line.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 14:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492681#M129512</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-05T14:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: record length in sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492751#M129544</link>
      <description>&lt;P&gt;Why would you want to increase the logical record length if it is already more than twice as long as you need for your actual data?&lt;/P&gt;
&lt;P&gt;Or is there some other question that you are trying to ask?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 18:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/record-length-in-sas/m-p/492751#M129544</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-05T18:29:06Z</dc:date>
    </item>
  </channel>
</rss>

