<?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 Pulling website data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Pulling-website-data/m-p/467036#M119193</link>
    <description>&lt;P&gt;I am struggling in my attempt to pull data into a table from a website. &amp;nbsp;Here is the code that I have thus far, but with this method, I have to parse the data (which I am not exactly sure how). &amp;nbsp;I also see other approaches where I could use the XML Mapper, but my mapper references keep failing (libname sec xmlv2 xmlfileref= test xmlmap=tempmap automap=replace) &amp;nbsp;Error: &amp;nbsp;The creation of the XML Mapper file failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts are appreciated. &amp;nbsp;Thanks. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename src temp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;http&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;method="GET"&lt;/P&gt;&lt;P&gt;url="&lt;A href="http://www.barrons.com/public/page/majormarket-nasdaqnational-A.html" target="_blank"&gt;http://www.barrons.com/public/page/majormarket-nasdaqnational-A.html&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;out=src;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; rep;&lt;/P&gt;&lt;P&gt;infile src length=len lrecl=&lt;STRONG&gt;32767&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;input line $varying32767. len;&lt;/P&gt;&lt;P&gt;line = strip(line);&lt;/P&gt;&lt;P&gt;if len&amp;gt;&lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jun 2018 20:59:37 GMT</pubDate>
    <dc:creator>Lost_Gary</dc:creator>
    <dc:date>2018-06-01T20:59:37Z</dc:date>
    <item>
      <title>Pulling website data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-website-data/m-p/467036#M119193</link>
      <description>&lt;P&gt;I am struggling in my attempt to pull data into a table from a website. &amp;nbsp;Here is the code that I have thus far, but with this method, I have to parse the data (which I am not exactly sure how). &amp;nbsp;I also see other approaches where I could use the XML Mapper, but my mapper references keep failing (libname sec xmlv2 xmlfileref= test xmlmap=tempmap automap=replace) &amp;nbsp;Error: &amp;nbsp;The creation of the XML Mapper file failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts are appreciated. &amp;nbsp;Thanks. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename src temp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;http&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;method="GET"&lt;/P&gt;&lt;P&gt;url="&lt;A href="http://www.barrons.com/public/page/majormarket-nasdaqnational-A.html" target="_blank"&gt;http://www.barrons.com/public/page/majormarket-nasdaqnational-A.html&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;out=src;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; rep;&lt;/P&gt;&lt;P&gt;infile src length=len lrecl=&lt;STRONG&gt;32767&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;input line $varying32767. len;&lt;/P&gt;&lt;P&gt;line = strip(line);&lt;/P&gt;&lt;P&gt;if len&amp;gt;&lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 20:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-website-data/m-p/467036#M119193</guid>
      <dc:creator>Lost_Gary</dc:creator>
      <dc:date>2018-06-01T20:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling website data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Pulling-website-data/m-p/467103#M119222</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/208658"&gt;@Lost_Gary&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The page is in HTML so I fear you'll have to parse the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the positive side: The links to all the different pages (A, B, C,...) are easily accessible in the code so once you've got the parsing of the first A page working, you should be able to just iterate over all the links using the same HTTP request and parsing code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And just as a thought: If that's a one off then it's eventually much easier to just copy/paste the tables into a text editor and then use a simple data step infile/input statement reading in orthogonal tab delimited data.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jun 2018 10:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Pulling-website-data/m-p/467103#M119222</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-06-02T10:17:50Z</dc:date>
    </item>
  </channel>
</rss>

