<?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: Import the txt file that is web php response in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726611#M225799</link>
    <description>&lt;P&gt;If you use SAS 9.4(M3 and later), you can use proc http.&lt;/P&gt;
&lt;P&gt;Try this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename webdoc 'c:/temp/want.txt' encoding='utf-8';  
proc http  
 method="get"  
 url="https://www.google.com/"  
 out=webdoc;  
run;  
  
data test;  
 infile webdoc;  
 attrib buf length=$4096;  
 input buf $4096.;  
 put buf=;  
run;  
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can get 'c:/temp/want.txt' as a text file,&amp;nbsp;and 'WORK.TEST' as a dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2021 03:22:53 GMT</pubDate>
    <dc:creator>japelin</dc:creator>
    <dc:date>2021-03-16T03:22:53Z</dc:date>
    <item>
      <title>Import the txt file that is web php response</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726246#M225673</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You know that in web, there is the request (the client's request -&amp;gt; server) and the response (server -&amp;gt; client's browser). The response from http://XXXXXX is a file stream type txt (generated with php).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So physical file doesn't exist, while clicking on&amp;nbsp; http://XXXXXX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if there is possible to import this kind of file ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for helping !&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 12:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726246#M225673</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-03-15T12:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Import the txt file that is web php response</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726611#M225799</link>
      <description>&lt;P&gt;If you use SAS 9.4(M3 and later), you can use proc http.&lt;/P&gt;
&lt;P&gt;Try this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename webdoc 'c:/temp/want.txt' encoding='utf-8';  
proc http  
 method="get"  
 url="https://www.google.com/"  
 out=webdoc;  
run;  
  
data test;  
 infile webdoc;  
 attrib buf length=$4096;  
 input buf $4096.;  
 put buf=;  
run;  
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can get 'c:/temp/want.txt' as a text file,&amp;nbsp;and 'WORK.TEST' as a dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 03:22:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726611#M225799</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-03-16T03:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Import the txt file that is web php response</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726647#M225819</link>
      <description>Thank you, Kawakami !&lt;BR /&gt;That works !</description>
      <pubDate>Tue, 16 Mar 2021 08:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-the-txt-file-that-is-web-php-response/m-p/726647#M225819</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2021-03-16T08:42:42Z</dc:date>
    </item>
  </channel>
</rss>

