<?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: Using SAS to automate login and data download from web portal in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423451#M104139</link>
    <description>&lt;P&gt;Is this a web portal that is open to the internet -- something we can look at?&amp;nbsp; Or is it internal to your organization?&lt;/P&gt;</description>
    <pubDate>Sat, 23 Dec 2017 15:37:07 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2017-12-23T15:37:07Z</dc:date>
    <item>
      <title>Using SAS to automate login and data download from web portal</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423355#M104090</link>
      <description>&lt;P&gt;I'm trying to find a way to use SAS to automatically login to a front-end web portal to then enter filter criteria (e.g., date range) and select download.&amp;nbsp; I would also have to deal with an "Are you sure you want to download this file..." popup window.&amp;nbsp; Can you direct me to an article or post that addresses how this can be done in SAS?&amp;nbsp; My hope is that I can automate this process so it can be run overnight.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried googling this topic but it was difficult to narrow down the search parameters to get what I needed.&amp;nbsp; Any information you can provide is appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 18:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423355#M104090</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2017-12-22T18:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS to automate login and data download from web portal</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423359#M104093</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/46197"&gt;@Ryanb2&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance that the web portal you're using also offers an API?&amp;nbsp; If so, it would be much easier to use PROC HTTP and REST methods to drive this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, &lt;A href="http://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=n0t7v16eitluu2n15ffpfeafqszs.htm&amp;amp;locale=en" target="_self"&gt;then I think PROC HTTP&lt;/A&gt; is still your best hope.&amp;nbsp; If the site uses Basic Auth then the signin could be simple with options on the proc.&amp;nbsp; If not, then a more complex authentication might require that you add an auth key into the HEADERS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;STRONG&gt;confirmation dialog&lt;/STRONG&gt; is a special problem though.&amp;nbsp; Maybe there is a URL parameter supported by the site that would bypass this?&amp;nbsp; You might need to spy on the http traffic using your browser's debugging features to see what's going on.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Aside from looking for an API method, I'd start by looking to see of another person has automated this using a tool like cURL.&amp;nbsp; If so, it's pretty straightforward to translate those commands to PROC HTTP.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 18:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423359#M104093</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-12-22T18:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS to automate login and data download from web portal</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423389#M104101</link>
      <description>&lt;P&gt;Thanks for the response Chris.&amp;nbsp; Unfortunately this web portal doesn't offer an API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked out the link in your reply&amp;nbsp;but I'm not familiar enough with web syntax or language to know even what post and get mean.&amp;nbsp; I also googled proc http but didn't find anything that was more user-friendly.&amp;nbsp;&amp;nbsp;I was hoping to find an example that showed a web page and the code used to login.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 22:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423389#M104101</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2017-12-22T22:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS to automate login and data download from web portal</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423451#M104139</link>
      <description>&lt;P&gt;Is this a web portal that is open to the internet -- something we can look at?&amp;nbsp; Or is it internal to your organization?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2017 15:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423451#M104139</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-12-23T15:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS to automate login and data download from web portal</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423605#M104191</link>
      <description>&lt;P&gt;I appreciate your willingness to look at the website.&amp;nbsp; It is a web portal open to the Internet, but due to the sensitive nature of the data and the restrictions required to access them I don't feel comfortable posting&amp;nbsp;the link here.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 16:43:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423605#M104191</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2017-12-26T16:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAS to automate login and data download from web portal</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423610#M104192</link>
      <description>&lt;P&gt;I don't know if this is helpful but I pasted the html associated with the user name and password below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form method="POST" action="login" id="login" name="login"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="row-fluid nowrap"&amp;gt;&lt;/P&gt;
&lt;P&gt;&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&amp;gt;&lt;/P&gt;
&lt;P&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;lt;label&amp;gt;User Name:&amp;lt;/label&amp;gt;&lt;/P&gt;
&lt;P&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;lt;input type="text" autocomplete="off" placeholder="" name="username" autofocus="true" &amp;gt;&lt;/P&gt;
&lt;P&gt;&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&amp;gt;&lt;/P&gt;
&lt;P&gt;&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&amp;gt;&lt;/P&gt;
&lt;P&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;lt;label&amp;gt;Password:&amp;lt;/label&amp;gt;&lt;/P&gt;
&lt;P&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;lt;input type="password" autocomplete="off" placeholder="" name="password" size="14" maxlength="12"&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 16:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-SAS-to-automate-login-and-data-download-from-web-portal/m-p/423610#M104192</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2017-12-26T16:52:13Z</dc:date>
    </item>
  </channel>
</rss>

