<?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: last line in the data set is blank after reading in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245400#M45787</link>
    <description>&lt;P&gt;fengyuwuzu wrote:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;either by proc import or data step with infile to read in .csv files, I notice that the last line in the data sets is blank.&lt;/P&gt;
&lt;P&gt;Actually the last line in the .csv file has no values at all.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is as expected. An empty line in a .csv file will cause the input statement to read nothing, so the variables stay "missing" for this iteration of the data step.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jan 2016 08:04:36 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-01-22T08:04:36Z</dc:date>
    <item>
      <title>last line in the data set is blank after reading in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245272#M45750</link>
      <description>&lt;P&gt;either by proc import or data step with infile to read in .csv files, I notice that the last line in the data sets is blank.&lt;/P&gt;
&lt;P&gt;Actually the last line in the .csv file has no values at all. Somehow when SAS read the data, it stops at the line below the last line in CSV.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to solve this issue? Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 19:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245272#M45750</guid>
      <dc:creator>fengyuwuzu</dc:creator>
      <dc:date>2016-01-21T19:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: last line in the data set is blank after reading in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245283#M45754</link>
      <description>Are you sure that there are no LF/CR at your last lkne with values?</description>
      <pubDate>Thu, 21 Jan 2016 20:27:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245283#M45754</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-01-21T20:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: last line in the data set is blank after reading in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245380#M45778</link>
      <description>&lt;P&gt;With data step import, you could add the statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if not missing(cats(of _all_));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to remove any line (observation) that is totally empty (missing).&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 03:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245380#M45778</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-01-22T03:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: last line in the data set is blank after reading in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245394#M45784</link>
      <description>&lt;P&gt;Could you please what 'cats(of _all_)' will do in following if clause?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token keyword"&gt;if&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;not&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;missing&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;cats&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;of &lt;SPAN class="token keyword"&gt;_all_&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 07:06:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245394#M45784</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2016-01-22T07:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: last line in the data set is blank after reading in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245400#M45787</link>
      <description>&lt;P&gt;fengyuwuzu wrote:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;either by proc import or data step with infile to read in .csv files, I notice that the last line in the data sets is blank.&lt;/P&gt;
&lt;P&gt;Actually the last line in the .csv file has no values at all.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is as expected. An empty line in a .csv file will cause the input statement to read nothing, so the variables stay "missing" for this iteration of the data step.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 08:04:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245400#M45787</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-01-22T08:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: last line in the data set is blank after reading in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245401#M45788</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if not missing(cats(of _all_));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That only works if all variables are character, as numeric variables will render a dot in the cats(of _all), causing the string to be non-missing.&lt;/P&gt;
&lt;P&gt;In order for this to work,&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options missing = ' ';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;needs to be set.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2016 08:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/last-line-in-the-data-set-is-blank-after-reading-in-SAS/m-p/245401#M45788</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-01-22T08:02:48Z</dc:date>
    </item>
  </channel>
</rss>

