<?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: Is there a way to conveniently download web files triggerable by buttons using SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Is-there-a-way-to-conveniently-download-web-files-triggerable-by/m-p/703071#M79919</link>
    <description>&lt;P&gt;If you know exact URL for the file you can do it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in  URL 'https://covid.cdc.gov/XXXXXXXXX/united_states_covid19_cases_and_deaths_by_state.csv' lrecl=1 recfm=n;
filename out     "%sysfunc(pathname(work))/united_states_covid19_cases_and_deaths_by_state.csv" lrecl=1 recfm=n;

data _null_;
  rc = fcopy('in', 'out');
  if rc then put "Error: " rc=;
run;

filename in  clear;
filename out clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;B&lt;/P&gt;</description>
    <pubDate>Wed, 02 Dec 2020 11:52:28 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2020-12-02T11:52:28Z</dc:date>
    <item>
      <title>Is there a way to conveniently download web files triggerable by buttons using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Is-there-a-way-to-conveniently-download-web-files-triggerable-by/m-p/703026#M79918</link>
      <description>&lt;DIV class="lotusFrame lotusui30_layout"&gt;&lt;DIV class="lotusMain"&gt;&lt;DIV class="lotusContent"&gt;&lt;DIV class="lotusLimit"&gt;&lt;DIV class="lotusForum "&gt;&lt;DIV class="lotusPagedContent"&gt;&lt;DIV class="forumQuestion"&gt;&lt;DIV&gt;&lt;DIV class="hentry lotusPost forumNotResolvedQuestion"&gt;&lt;DIV class="lotusPostContent"&gt;&lt;DIV class="entry-content lotusPostDetails"&gt;&lt;P&gt;Many of our users are doing a lot of weekly and daily updates on some publicly available contents, a good example here would be the 7 days&amp;nbsp;COVID cases that is retrievable here at:&amp;nbsp;&lt;A href="https://covid.cdc.gov/covid-data-tracker/#cases_casesper100klast7days." target="_blank" rel="noopener"&gt;https://covid.cdc.gov/covid-data-tracker/#cases_casesper100klast7days.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is really an intuitive one: instead of having human interference and manually clicking that 'download' button each time to get the latest case numbers as a .csv file, is there a way to download the file using some kind of SAS procedure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While my SAS and HTML knowledge is limited, I have tried a few things such as PROC HTTP, but the webpage seems to be using some level of javascript and therefore the static methods which I researched turned out to be not as useful as they should be otherwise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From my own experience I've utilized web scrapping tools available with python or r to handle an interactive webpage like this, but now SAS is the only tool I am having access to, which ultimately brought me to here to seek some advices on this technical&amp;nbsp;miscellany. Many thanks to anyone who could leave their thoughts!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Dec 2020 08:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Is-there-a-way-to-conveniently-download-web-files-triggerable-by/m-p/703026#M79918</guid>
      <dc:creator>avinashginjupal</dc:creator>
      <dc:date>2020-12-02T08:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to conveniently download web files triggerable by buttons using SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Is-there-a-way-to-conveniently-download-web-files-triggerable-by/m-p/703071#M79919</link>
      <description>&lt;P&gt;If you know exact URL for the file you can do it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in  URL 'https://covid.cdc.gov/XXXXXXXXX/united_states_covid19_cases_and_deaths_by_state.csv' lrecl=1 recfm=n;
filename out     "%sysfunc(pathname(work))/united_states_covid19_cases_and_deaths_by_state.csv" lrecl=1 recfm=n;

data _null_;
  rc = fcopy('in', 'out');
  if rc then put "Error: " rc=;
run;

filename in  clear;
filename out clear;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;B&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 11:52:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Is-there-a-way-to-conveniently-download-web-files-triggerable-by/m-p/703071#M79919</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-12-02T11:52:28Z</dc:date>
    </item>
  </channel>
</rss>

