<?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 Blankline problem while reading multiple data files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Blankline-problem-while-reading-multiple-data-files/m-p/398352#M96351</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read multiple files using filevar option. One of my data file has a blank observation in the last. So the other datafile is not reading.. &amp;nbsp;For your ref.. I am adding code and the data here...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody helpme in getting this. why this is happening while we having blank observation in the last. and how sas treats it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;infile datalines;&lt;BR /&gt;input file2read $ 40.;&lt;BR /&gt;infile dummy filevar=file2read end=done;&lt;BR /&gt;do while(not done);&lt;BR /&gt;input var1 $ var2 $ var3 $;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;datalines;&lt;/P&gt;&lt;P&gt;D:\sas\Practice_ds\ae.txt&lt;BR /&gt;D:\sas\source\DLM\ae_new.txt&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Sep 2017 05:16:30 GMT</pubDate>
    <dc:creator>DayaG</dc:creator>
    <dc:date>2017-09-24T05:16:30Z</dc:date>
    <item>
      <title>Blankline problem while reading multiple data files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blankline-problem-while-reading-multiple-data-files/m-p/398352#M96351</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to read multiple files using filevar option. One of my data file has a blank observation in the last. So the other datafile is not reading.. &amp;nbsp;For your ref.. I am adding code and the data here...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anybody helpme in getting this. why this is happening while we having blank observation in the last. and how sas treats it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data one;&lt;BR /&gt;infile datalines;&lt;BR /&gt;input file2read $ 40.;&lt;BR /&gt;infile dummy filevar=file2read end=done;&lt;BR /&gt;do while(not done);&lt;BR /&gt;input var1 $ var2 $ var3 $;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;datalines;&lt;/P&gt;&lt;P&gt;D:\sas\Practice_ds\ae.txt&lt;BR /&gt;D:\sas\source\DLM\ae_new.txt&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2017 05:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blankline-problem-while-reading-multiple-data-files/m-p/398352#M96351</guid>
      <dc:creator>DayaG</dc:creator>
      <dc:date>2017-09-24T05:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Blankline problem while reading multiple data files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Blankline-problem-while-reading-multiple-data-files/m-p/398366#M96359</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77288"&gt;@DayaG&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add MISSOVER or TRUNCOVER to your 2nd Infile statement.&lt;/P&gt;
&lt;P&gt;Code like below should do the job for you:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
  infile datalines;
  input file2read $40.;
  infile dummy filevar=file2read end=done truncover;

  do while(not done);
    input var1 $ var2 $ var3 $;
    if not missing(_infile_) then output;
  end;

  datalines;
D:\sas\Practice_ds\ae.txt
D:\sas\source\DLM\ae_new.txt
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Sep 2017 08:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Blankline-problem-while-reading-multiple-data-files/m-p/398366#M96359</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-09-24T08:49:17Z</dc:date>
    </item>
  </channel>
</rss>

