<?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 Reading Word by Word Using FILEVAR in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621003#M182512</link>
    <description>&lt;P&gt;Suppose I am interested in the following two pages.&lt;/P&gt;&lt;PRE&gt;https://news.ycombinator.com/news?p=1
https://news.ycombinator.com/news?p=2&lt;/PRE&gt;&lt;P&gt;I can feed these two addresses and collectively read them using FILEVAR. Just one issue is that I want each observation to be each word rather than each line. I coded as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data url;
	do i=1 to 2;
		url='https://news.ycombinator.com/news?p='||strip(i);
		output;
	end;
	drop i;
run;

data htm;
	set url;
	infile i url filevar=url truncover end=e column=c length=l;
	do until(e);
		do j=1 by 1 until(c&amp;gt;l);
			input htm :$32767. @;
			output;
		end;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then I found that there is an infinite loop and SAS cannot read the pages correctly. I tried to change the order of two do loops but failed too. What am I doing wrong?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2020 22:14:11 GMT</pubDate>
    <dc:creator>Junyong</dc:creator>
    <dc:date>2020-01-29T22:14:11Z</dc:date>
    <item>
      <title>Reading Word by Word Using FILEVAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621003#M182512</link>
      <description>&lt;P&gt;Suppose I am interested in the following two pages.&lt;/P&gt;&lt;PRE&gt;https://news.ycombinator.com/news?p=1
https://news.ycombinator.com/news?p=2&lt;/PRE&gt;&lt;P&gt;I can feed these two addresses and collectively read them using FILEVAR. Just one issue is that I want each observation to be each word rather than each line. I coded as follows.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data url;
	do i=1 to 2;
		url='https://news.ycombinator.com/news?p='||strip(i);
		output;
	end;
	drop i;
run;

data htm;
	set url;
	infile i url filevar=url truncover end=e column=c length=l;
	do until(e);
		do j=1 by 1 until(c&amp;gt;l);
			input htm :$32767. @;
			output;
		end;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then I found that there is an infinite loop and SAS cannot read the pages correctly. I tried to change the order of two do loops but failed too. What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 22:14:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621003#M182512</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2020-01-29T22:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Word by Word Using FILEVAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621064#M182530</link>
      <description>&lt;P&gt;You never switch to a new line within your outer loop, so the end condition (e) will never be reached. Add an explicit input:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data htm;
set url;
infile i url filevar=url truncover end=e column=c length=l;
do until(e);
  do j=1 by 1 until(c&amp;gt;l);
    input htm :$32767. @;
    output;
  end;
  input;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Jan 2020 06:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621064#M182530</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-30T06:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Word by Word Using FILEVAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621065#M182531</link>
      <description>&lt;P&gt;Very appreciate. I was looking at &lt;A href="http://support.sas.com/techsup/technote/ts581.pdf" target="_blank" rel="noopener"&gt;this document&lt;/A&gt;, but it does not use two INPUTs—does my code require another INPUT because of&amp;nbsp;@?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 07:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621065#M182531</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2020-01-30T07:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reading Word by Word Using FILEVAR</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621069#M182535</link>
      <description>&lt;P&gt;Your&amp;nbsp;@ keeps your line pointer in the same line. Since you also do not skip to the next data step iteration when you've read a line (because of the outer loop), no implicit input is executed that would put you in the next input line automatically. So you have to supply that skip to the next line yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 07:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-Word-by-Word-Using-FILEVAR/m-p/621069#M182535</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-30T07:33:05Z</dc:date>
    </item>
  </channel>
</rss>

