<?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: how to input variable length records? in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592733#M8066</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16492"&gt;@MaryA_Marion&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;novinosrin, Thanks. Is there something special about lrecl=32767? I tried using lrecl=512 and got an error. MM&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on the error;&lt;/P&gt;
&lt;P&gt;Post the code with the error message from the log, Copy from the log and paste into a code box opened with the forum's {I} or "running man" icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TRUNCOVER really doesn't make a lot of sense when using the @@ to hold the input line though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to say that whoever compiled that source file has issues though unless there is some information that is important that has been removed. Having from one to thirty or so names on a single row and the names in neither rank order or alphabetical order is pretty odd IMHO.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 15:58:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-09-30T15:58:43Z</dc:date>
    <item>
      <title>how to input variable length records?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592523#M8055</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The enclosed code is not inputting two alphanumeric variables which are in the enclosed txt file. How to read this data in? The software just hangs up and nothing happens?&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mary A. Marion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let dirdata=/folders/myshortcuts/611/data/Week 03/HWdata/;&lt;BR /&gt;data names;&lt;BR /&gt;infile "&amp;amp;dirdata.top-1000-baby-boy-names.mm.txt"&lt;BR /&gt;/* termstr=CRLF */ truncover lrecl=512 pad ;&lt;BR /&gt;*input name $ rank2 comma9. @@;&lt;BR /&gt;input name: $30. rank2 $ @@;&lt;BR /&gt;run;&lt;BR /&gt;proc print; run; *963 obs, should be 1000 obs;&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;</description>
      <pubDate>Mon, 30 Sep 2019 00:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592523#M8055</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2019-09-30T00:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to input variable length records?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592524#M8056</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile 'C:\Users\sony\Desktop\top-1000-baby-boy-names.mm.txt' lrecl=32767;
input name: $30. rank2 $ @@	;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
1163  data have;
1164  infile 'C:\Users\sony\Desktop\top-1000-baby-boy-names.mm.txt' lrecl=32767;
1165  input name: $30. rank2 $ @@ ;
1166  run;

NOTE: The infile 'C:\Users\sony\Desktop\top-1000-baby-boy-names.mm.txt' is:
      Filename=C:\Users\sony\Desktop\top-1000-baby-boy-names.mm.txt,
      RECFM=V,LRECL=32767,File Size (bytes)=13220,
      Last Modified=30Sep2019:05:45:16,
      Create Time=30Sep2019:05:45:16

NOTE: 488 records were read from the infile 'C:\Users\sony\Desktop\top-1000-baby-boy-names.mm.txt'.
      The minimum record length was 8.
      The maximum record length was 415.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.HAVE has 1000 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Sep 2019 00:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592524#M8056</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-09-30T00:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to input variable length records?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592535#M8057</link>
      <description>novinosrin,  Thanks. Is there something special about lrecl=32767? I tried using lrecl=512 and got an error.  MM</description>
      <pubDate>Mon, 30 Sep 2019 01:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592535#M8057</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2019-09-30T01:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to input variable length records?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592733#M8066</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16492"&gt;@MaryA_Marion&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;novinosrin, Thanks. Is there something special about lrecl=32767? I tried using lrecl=512 and got an error. MM&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on the error;&lt;/P&gt;
&lt;P&gt;Post the code with the error message from the log, Copy from the log and paste into a code box opened with the forum's {I} or "running man" icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TRUNCOVER really doesn't make a lot of sense when using the @@ to hold the input line though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have to say that whoever compiled that source file has issues though unless there is some information that is important that has been removed. Having from one to thirty or so names on a single row and the names in neither rank order or alphabetical order is pretty odd IMHO.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 15:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592733#M8066</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-30T15:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to input variable length records?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592782#M8067</link>
      <description>&lt;P&gt;You cannot use TRUNCOVER option on the INFILE statement in combination with the double trailing&amp;nbsp;@ on INPUT statement.&lt;/P&gt;
&lt;P&gt;The former says to stay on the same line after reading past the end of the data on the line. The later says to keep on the same line after the end of the data step iteration.&amp;nbsp; The combination means that it will never read past the first line of the input text.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 18:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-input-variable-length-records/m-p/592782#M8067</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-30T18:11:50Z</dc:date>
    </item>
  </channel>
</rss>

