<?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 Issue with proc http file download in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-http-file-download/m-p/613908#M179380</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am working on a proc http download.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However this webpage has a login and password.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the steps are not direct. After I login, I change the date parameter to the current month and year and then click download to download the csv file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Earlier, I was succesful with the proc http direct download without a login. However, with a login and navigation to a few different places on the website, I am unsure how to proceed. Could someone please guide me?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 1- I wrote the code proc http to be able to connect via a proxy and download a file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let proxy_host = proxy.companyname.com; /*Replaced with company name*/&amp;nbsp;&lt;BR /&gt;%let port = 1234;&amp;nbsp; /*For Example only*/&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename response '/home/Test_Datasets/Media/Login_response.html';&lt;BR /&gt;filename out '/home/Test_Datasets/Media/Login_Header.txt';&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/*Log in to this website */&lt;BR /&gt;proc http &lt;BR /&gt;method="POST"&lt;BR /&gt;url="&lt;A href="https://portal.mintel.com/external/requestLogin" target="_blank"&gt;https://portal.mintel.com/external/requestLogin&lt;/A&gt;?"&lt;BR /&gt;ct="application/x-www-form-urlencoded"&lt;BR /&gt;proxyhost="&amp;amp;proxy_host."&lt;BR /&gt;proxyport=1234&lt;/P&gt;
&lt;P&gt;in='csrfmiddlewaretoken=b4olxF2UFL2GyjtwQ2wGJrraSDDJKVZZZGaRRqBoJ7wu0waE1bVHTb3fK3LuoLNx&amp;amp;login_view-current_step=auth&amp;amp;auth-next=&amp;amp;auth-password=******&amp;amp;auth-username=****%gmail.com'&lt;BR /&gt;headerout= out&lt;BR /&gt;out=response;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what my step 2 should be?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Dec 2019 15:12:48 GMT</pubDate>
    <dc:creator>ilearnsas</dc:creator>
    <dc:date>2019-12-26T15:12:48Z</dc:date>
    <item>
      <title>Issue with proc http file download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-http-file-download/m-p/613908#M179380</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am working on a proc http download.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However this webpage has a login and password.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the steps are not direct. After I login, I change the date parameter to the current month and year and then click download to download the csv file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Earlier, I was succesful with the proc http direct download without a login. However, with a login and navigation to a few different places on the website, I am unsure how to proceed. Could someone please guide me?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step 1- I wrote the code proc http to be able to connect via a proxy and download a file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let proxy_host = proxy.companyname.com; /*Replaced with company name*/&amp;nbsp;&lt;BR /&gt;%let port = 1234;&amp;nbsp; /*For Example only*/&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename response '/home/Test_Datasets/Media/Login_response.html';&lt;BR /&gt;filename out '/home/Test_Datasets/Media/Login_Header.txt';&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/*Log in to this website */&lt;BR /&gt;proc http &lt;BR /&gt;method="POST"&lt;BR /&gt;url="&lt;A href="https://portal.mintel.com/external/requestLogin" target="_blank"&gt;https://portal.mintel.com/external/requestLogin&lt;/A&gt;?"&lt;BR /&gt;ct="application/x-www-form-urlencoded"&lt;BR /&gt;proxyhost="&amp;amp;proxy_host."&lt;BR /&gt;proxyport=1234&lt;/P&gt;
&lt;P&gt;in='csrfmiddlewaretoken=b4olxF2UFL2GyjtwQ2wGJrraSDDJKVZZZGaRRqBoJ7wu0waE1bVHTb3fK3LuoLNx&amp;amp;login_view-current_step=auth&amp;amp;auth-next=&amp;amp;auth-password=******&amp;amp;auth-username=****%gmail.com'&lt;BR /&gt;headerout= out&lt;BR /&gt;out=response;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure what my step 2 should be?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 15:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-http-file-download/m-p/613908#M179380</guid>
      <dc:creator>ilearnsas</dc:creator>
      <dc:date>2019-12-26T15:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with proc http file download</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-http-file-download/m-p/613916#M179382</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try the WEBUSERNAME= &amp;amp; WEBPASSWORD= options for PROC HTP. Check these documents:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3232-2019.pdf" target="_blank"&gt;https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3232-2019.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2018/11/01/proc-http-download-data/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2018/11/01/proc-http-download-data/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 15:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issue-with-proc-http-file-download/m-p/613916#M179382</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-12-26T15:44:11Z</dc:date>
    </item>
  </channel>
</rss>

