<?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 why some of rows are missing using infile to read text file? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802881#M316105</link>
    <description>&lt;P&gt;I know for the fact I have 1000 obs&lt;/P&gt;&lt;P&gt;when I run my code which is the following in the output I see some of rows are missing and I only have up 821 rows.&lt;/P&gt;&lt;PRE&gt;libname blood "~/";&lt;BR /&gt;&lt;BR /&gt;data blood.one;&lt;BR /&gt;Infile "~/blood.txt";&lt;BR /&gt;input &lt;BR /&gt;    @1 obs 4.&lt;BR /&gt;	@6 Gender $7.&lt;BR /&gt;	@12 BloodType $3.&lt;BR /&gt;	@15 AgeGroup	$7.&lt;BR /&gt;	@22 WBC	 4.&lt;BR /&gt;	@26 RBC	7.&lt;BR /&gt;	@33Chol	 4.&lt;BR /&gt;	;&lt;BR /&gt;run;&lt;/PRE&gt;</description>
    <pubDate>Sat, 19 Mar 2022 00:31:48 GMT</pubDate>
    <dc:creator>baharmollex</dc:creator>
    <dc:date>2022-03-19T00:31:48Z</dc:date>
    <item>
      <title>why some of rows are missing using infile to read text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802881#M316105</link>
      <description>&lt;P&gt;I know for the fact I have 1000 obs&lt;/P&gt;&lt;P&gt;when I run my code which is the following in the output I see some of rows are missing and I only have up 821 rows.&lt;/P&gt;&lt;PRE&gt;libname blood "~/";&lt;BR /&gt;&lt;BR /&gt;data blood.one;&lt;BR /&gt;Infile "~/blood.txt";&lt;BR /&gt;input &lt;BR /&gt;    @1 obs 4.&lt;BR /&gt;	@6 Gender $7.&lt;BR /&gt;	@12 BloodType $3.&lt;BR /&gt;	@15 AgeGroup	$7.&lt;BR /&gt;	@22 WBC	 4.&lt;BR /&gt;	@26 RBC	7.&lt;BR /&gt;	@33Chol	 4.&lt;BR /&gt;	;&lt;BR /&gt;run;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Mar 2022 00:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802881#M316105</guid>
      <dc:creator>baharmollex</dc:creator>
      <dc:date>2022-03-19T00:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: why some of rows are missing using infile to read text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802882#M316106</link>
      <description>&lt;P&gt;What do the NOTEs in the SAS log say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are going to use fixed format input statements like that then you must use the TRUNCOVER option on the INFILE statement.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile "~/blood.txt" truncover;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With the default FLOWOVER option when you read past the end of the line the INPUT statement will hunt for the field on the next line.&amp;nbsp; With the older less useful MISSOVER option if there are between 33 and 36 characters on the line then CHOL will be missing because there are not four characters for the 4. informat to read.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 00:40:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802882#M316106</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-19T00:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: why some of rows are missing using infile to read text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802936#M316137</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69585i01722379615EFA01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sas.jpg" alt="sas.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my raw data, the last column is Chol length is 3 but when I change it to 2 I see 1000 values.&lt;/P&gt;&lt;P&gt;I tried truncovern as well. Nothing changed. can you please help?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 17:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802936#M316137</guid>
      <dc:creator>baharmollex</dc:creator>
      <dc:date>2022-03-19T17:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: why some of rows are missing using infile to read text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802937#M316138</link>
      <description>&lt;DIV&gt;&lt;DIV class=""&gt;NOTE: Invalid data for RBC in line 88 26-32.&lt;/DIV&gt;&lt;DIV class=""&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;/DIV&gt;&lt;DIV class=""&gt;88 88 Female A Old 10260 5.63 296 36&lt;/DIV&gt;&lt;DIV class=""&gt;obs=88 Gender=Female BloodType=A AgeGroup=Old WBC=1026 RBC=. Chol=2 _ERROR_=1 _N_=88&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Invalid data for RBC in line 937 26-32.&lt;/DIV&gt;&lt;DIV class=""&gt;937 937 Male A Young 10550 5.41 . 34&lt;/DIV&gt;&lt;DIV class=""&gt;obs=937 Gender=Male BloodType=A AgeGroup=Young WBC=1055 RBC=. Chol=. _ERROR_=1 _N_=937&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 1000 records were read from the infile "~/blood.txt".&lt;/DIV&gt;&lt;DIV class=""&gt;The minimum record length was 34.&lt;/DIV&gt;&lt;DIV class=""&gt;The maximum record length was 36.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: The data set BLOOD.ONE has 1000 observations and 7 variables.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE class=""&gt;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Mar 2022 17:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802937#M316138</guid>
      <dc:creator>baharmollex</dc:creator>
      <dc:date>2022-03-19T17:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: why some of rows are missing using infile to read text file?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802942#M316141</link>
      <description>&lt;P&gt;READ THE NOTES IN THE SAS LOG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want help interpreting them then copy the lines from the SAS log for the data step that is reading the text file.&amp;nbsp; Start with the DATA statement and include all of the notes after the end of the stop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paste them into the box that opens when you click on the Insert Code icon (the icon that looks like the characters &amp;lt; / &amp;gt; ).&amp;nbsp; Please do not post text as photographs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps SAS is trying to read the end of line characters as part of the data of the line.&lt;/P&gt;
&lt;P&gt;Try adding the option TERMSTR=CRLF to the INFILE statement.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2022 19:48:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-some-of-rows-are-missing-using-infile-to-read-text-file/m-p/802942#M316141</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-19T19:48:33Z</dc:date>
    </item>
  </channel>
</rss>

