<?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 extract website list table using PROC HTTP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/734740#M228877</link>
    <description>&lt;P&gt;Usually, we&amp;nbsp;click on ‘LIST’ tab on a website then ‘Export to Excel’ and save as xlsx file. This will give us the right report, but it’s a manual process. Can we automate this process&amp;nbsp;through PROC HTTP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following. It will run,&amp;nbsp;but it's does not give me the right table:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;%LET RootFileDirectory = C:\Users\xxxx\prod\data;&lt;BR /&gt;FILENAME sp_tprm&amp;nbsp; "&amp;amp;RootFileDirectory\sp_tprm.json";/*&amp;nbsp; sp_tprm */&lt;BR /&gt;%LET RESTBaseURL=&lt;A href="http://xxxxxx.net/sites/yyyyy-038/_api" target="_blank"&gt;http://xxxxxx.net/sites/yyyyy-038/_api&lt;/A&gt;;&lt;BR /&gt;PROC HTTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; URL= "&amp;amp;RESTBaseURL./lists/getbytitle('Category-Managed Third Party Request')/items?$top=3000"&lt;BR /&gt;&amp;nbsp;OUT=sp_tprm&lt;BR /&gt;&amp;nbsp;&amp;nbsp; AUTH_NTLM METHOD="GET";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; headers 'accept' = 'application/json;odata=verbose';&lt;BR /&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 14:50:29 GMT</pubDate>
    <dc:creator>peterluan</dc:creator>
    <dc:date>2021-04-16T14:50:29Z</dc:date>
    <item>
      <title>extract website list table using PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/734740#M228877</link>
      <description>&lt;P&gt;Usually, we&amp;nbsp;click on ‘LIST’ tab on a website then ‘Export to Excel’ and save as xlsx file. This will give us the right report, but it’s a manual process. Can we automate this process&amp;nbsp;through PROC HTTP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following. It will run,&amp;nbsp;but it's does not give me the right table:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;%LET RootFileDirectory = C:\Users\xxxx\prod\data;&lt;BR /&gt;FILENAME sp_tprm&amp;nbsp; "&amp;amp;RootFileDirectory\sp_tprm.json";/*&amp;nbsp; sp_tprm */&lt;BR /&gt;%LET RESTBaseURL=&lt;A href="http://xxxxxx.net/sites/yyyyy-038/_api" target="_blank"&gt;http://xxxxxx.net/sites/yyyyy-038/_api&lt;/A&gt;;&lt;BR /&gt;PROC HTTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; URL= "&amp;amp;RESTBaseURL./lists/getbytitle('Category-Managed Third Party Request')/items?$top=3000"&lt;BR /&gt;&amp;nbsp;OUT=sp_tprm&lt;BR /&gt;&amp;nbsp;&amp;nbsp; AUTH_NTLM METHOD="GET";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; headers 'accept' = 'application/json;odata=verbose';&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 14:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/734740#M228877</guid>
      <dc:creator>peterluan</dc:creator>
      <dc:date>2021-04-16T14:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: extract website list table using PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/734742#M228879</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/57372"&gt;@peterluan&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends on the website and whether there is an API or direct link to get to the data. If you have specific example/site we could explore options for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Ask-the-Expert/How-Do-You-Use-SAS-to-Access-Data-and-APIs-From-the-Web-Q-amp-A/ta-p/699613" target="_self"&gt;Check out this webinar (with code and slides provided)&lt;/A&gt; for general techniques that might help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 14:57:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/734742#M228879</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-04-16T14:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: extract website list table using PROC HTTP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/737452#M229913</link>
      <description>&lt;P&gt;Thanks for the information. I still need to investigate what you suggested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have captured the “owssvr.iqy” file ( when you click the ‘export to Excel’) and copy the URL in it.&lt;/P&gt;&lt;P&gt;Then&amp;nbsp; ran:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FILENAME sp_tprm&amp;nbsp; "C:\Users\u407770\prod\data\sp_tprm.XML";&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;HTTP&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; URL= '&lt;A href="http://xxxxxx.xxxxx.xxxxx.net/sites/corprisk-opsrisk-038/_vti_bin/owssvr.dll?XMLDATA=1&amp;amp;List={ABF6A9AF-BDE0-4FB9-8741-098CF5C65EBE}&amp;amp;View={254D807D-74C7-44F9-8C33-341527143136}&amp;amp;RowLimit=0&amp;amp;RootFolder=%2fsites%2fcorprisk%2dopsrisk%2d038%2fLists%2fAlternative%20Practice%20Request" target="_blank"&gt;http://xxxxxx.xxxxx.xxxxx.net/sites/corprisk-opsrisk-038/_vti_bin/owssvr.dll?XMLDATA=1&amp;amp;List={ABF6A9AF-BDE0-4FB9-8741-098CF5C65EBE}&amp;amp;View={254D807D-74C7-44F9-8C33-341527143136}&amp;amp;RowLimit=0&amp;amp;RootFolder=%2fsites%2fcorprisk%2dopsrisk%2d038%2fLists%2fAlternative%20Practice%20Request&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUT=sp_tprm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTH_NTLM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; METHOD="GET";&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;“sp_tprm.XML” looks good.&lt;/P&gt;&lt;P&gt;Stokke, Delayne H.&amp;lt;Delayne.Stokke@wellsfargo.com&amp;gt; helped me with reading the xml file using the SAS XML mapper to come up with xml map and xml tables. However, he found transcode errors, and was able to read the whole file using SAS 9.4 (Unicode Support).&amp;nbsp;Everything seems working except two fields still contains HTML/XML tags.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 21:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extract-website-list-table-using-PROC-HTTP/m-p/737452#M229913</guid>
      <dc:creator>peterluan</dc:creator>
      <dc:date>2021-04-27T21:38:31Z</dc:date>
    </item>
  </channel>
</rss>

