<?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: filename url - muliple entries from same line in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78031#M22530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code (after filename url)&lt;/P&gt;&lt;P&gt;data Test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Record $1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile foo lrecl=32700;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (_Top);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Top=find(_infile_,'&amp;lt;article&amp;gt;');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not _Top then input;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do until (_Bottom);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Bottom=find(_infile_,' &amp;lt;/article&amp;gt;');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _Bottom then STOP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Record=_infile_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*This removes all the html tag*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; *rx1=prxparse("s/&amp;lt;.*?&amp;gt;//");&lt;/P&gt;&lt;P&gt;&amp;nbsp; *call prxchange(rx1,99,Record);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Drop _:;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Drop rx1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Here is the html sample (as it is huge, I have taken only a portion of it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;article&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;&lt;SPAN&gt;" xmlns:h="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;&lt;SPAN&gt;" id="mainContent"&amp;gt;&amp;lt;header&amp;gt;&amp;lt;h1 class="entryType"&amp;gt;Definition of &amp;lt;b&amp;gt;test&amp;lt;/b&amp;gt; in&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; English&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;div class="entryPronunciation headpron"&amp;gt;Pronunciation: &amp;lt;a href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://oxforddictionaries.com/words/key-to-pronunciation"&gt;http://oxforddictionaries.com/words/key-to-pronunciation&lt;/A&gt;&lt;SPAN&gt;"&amp;gt; /tɛst/&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;........&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/article&amp;gt;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe Tom's answer will work. However, thanks in advance for any insight your can throw.&lt;/P&gt;&lt;P&gt;Jijil Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Jul 2013 17:32:02 GMT</pubDate>
    <dc:creator>JAR</dc:creator>
    <dc:date>2013-07-14T17:32:02Z</dc:date>
    <item>
      <title>filename url - muliple entries from same line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78028#M22527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need help to read one url file into a varible called record. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*output:*/&lt;/P&gt;&lt;P&gt;Record&lt;/P&gt;&lt;P&gt;&amp;lt;/h1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;br/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;&lt;/P&gt;&lt;P&gt;test&lt;/P&gt;&lt;P&gt;&amp;lt;span class="homograph"&amp;gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;&amp;lt;/span&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/h2&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, I want only "test" and "1". If someone can help me to read either the whole items or non-html-tag portion it will be highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jijil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jul 2013 07:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78028#M22527</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-07-14T07:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: filename url - muliple entries from same line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78029#M22528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Can you show the code that you've tried that produces the output? Also, can you provide an example of your FILENAME url program? Without a context for your snippet (which is only part of an HTML page)&amp;nbsp; it is hard to provide constructive suggestions. Typically, an HTML page, such as you would read with the FILENAME method is a complete syntactically correct HTML page -- with a DOCTYPE,, an &amp;lt;HTML&amp;gt; tag,&amp;nbsp; a &amp;lt;HEAD&amp;gt; container, a &amp;lt;BODY&amp;gt; container, etc. You only show a snippet from an HTML file. What program did you run to get from the snippet to the output that you show?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jul 2013 15:58:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78029#M22528</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-07-14T15:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: filename url - muliple entries from same line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78030#M22529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this what you're after?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data stuff;&lt;BR /&gt; length ResultText $16;&lt;BR /&gt; TestString = '&amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;';&lt;BR /&gt; prxid = prxparse('S/(&amp;lt;[^&amp;gt;]*&amp;gt;)/|/');&lt;BR /&gt; TestString2 = prxchange(prxid, -1, TestString);&lt;/P&gt;&lt;P&gt; do i=1 to count(TestString2, "|") + 1;&lt;BR /&gt;&amp;nbsp; ResultText=scan(TestString2, i, '|');&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ^missing(ResultText) then&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jul 2013 16:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78030#M22529</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2013-07-14T16:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: filename url - muliple entries from same line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78031#M22530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the code (after filename url)&lt;/P&gt;&lt;P&gt;data Test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Record $1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile foo lrecl=32700;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do until (_Top);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Top=find(_infile_,'&amp;lt;article&amp;gt;');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not _Top then input;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do until (_Bottom);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _Bottom=find(_infile_,' &amp;lt;/article&amp;gt;');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _Bottom then STOP;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Record=_infile_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*This removes all the html tag*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; *rx1=prxparse("s/&amp;lt;.*?&amp;gt;//");&lt;/P&gt;&lt;P&gt;&amp;nbsp; *call prxchange(rx1,99,Record);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Drop _:;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Drop rx1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Here is the html sample (as it is huge, I have taken only a portion of it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;article&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;&lt;SPAN&gt;" xmlns:h="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/A&gt;&lt;SPAN&gt;" id="mainContent"&amp;gt;&amp;lt;header&amp;gt;&amp;lt;h1 class="entryType"&amp;gt;Definition of &amp;lt;b&amp;gt;test&amp;lt;/b&amp;gt; in&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; English&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;h2 class="pageTitle entryTitle"&amp;gt;test&amp;lt;span class="homograph"&amp;gt;1&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;&amp;lt;div class="entryPronunciation headpron"&amp;gt;Pronunciation: &amp;lt;a href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://oxforddictionaries.com/words/key-to-pronunciation"&gt;http://oxforddictionaries.com/words/key-to-pronunciation&lt;/A&gt;&lt;SPAN&gt;"&amp;gt; /tɛst/&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;........&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/article&amp;gt;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe Tom's answer will work. However, thanks in advance for any insight your can throw.&lt;/P&gt;&lt;P&gt;Jijil Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Jul 2013 17:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78031#M22530</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-07-14T17:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: filename url - muliple entries from same line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78032#M22531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data want;
 infile 'd:\temp\x.html' lrecl=20000 dsd dlm='&amp;lt;&amp;gt;';
 input @'&amp;gt;' x : $200. @@;
 if not missing(x);
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 08:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78032#M22531</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-15T08:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: filename url - muliple entries from same line</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78033#M22532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ksharp. This helped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 15:29:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-url-muliple-entries-from-same-line/m-p/78033#M22532</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-07-29T15:29:13Z</dc:date>
    </item>
  </channel>
</rss>

