<?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: read url fail in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356641#M274145</link>
    <description>&lt;P&gt;&amp;nbsp;A major difference between my log and your log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yours:&amp;nbsp;&lt;SPAN&gt;GET /talks/quick-list HTTP/1.0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Mine:&amp;nbsp;GET /talks/quick-list HTTP/1.1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible that you're behind a firewall that doesn't support http/1.1 requests?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 06 May 2017 19:45:55 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-05-06T19:45:55Z</dc:date>
    <item>
      <title>read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356597#M274138</link>
      <description>&lt;P&gt;.I have problem&amp;nbsp; to read the url,please help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;PRE&gt;FILENAME SOURCE URL "%STR(https://www.ted.com/talks/quick-list)" DEBUG;
DATA SOURCE2;
FORMAT WEBPAGE $1000.;
INFILE SOURCE LRECL=32767 DELIMITER="&amp;gt;";
INPUT WEBPAGE $ @@;
RUN;&lt;/PRE&gt;</description>
      <pubDate>Sat, 06 May 2017 05:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356597#M274138</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-05-06T05:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356598#M274139</link>
      <description>&lt;P&gt;What problem do you have ?&lt;/P&gt;
&lt;P&gt;Please post your log.&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2017 05:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356598#M274139</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-05-06T05:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356599#M274140</link>
      <description>Why are you using the %STR function?</description>
      <pubDate>Sat, 06 May 2017 06:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356599#M274140</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2017-05-06T06:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356624#M274141</link>
      <description>&lt;P&gt;Your code reads the url just fine, but it doesn't do anything to parse it. e.g., if you wanted the dates and titles of the presentations, the following works for all but one of the presentations. The one it misses contains a non-ASCII character:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;FILENAME SOURCE URL "%STR(https://www.ted.com/talks/quick-list)" DEBUG;
DATA SOURCE2 (drop=junk);
  informat junk $80.;
  informat published $8.;
  informat title $100.;
  INFILE SOURCE LRECL=32767 DELIMITER="&amp;gt;";
  INPUT @"&amp;lt;spam class='meta'"
  published &amp;amp;/////junk title &amp;amp;;
  title=tranwrd(scan(title,1,'&amp;lt;'),'&amp;amp;#39;',"'");
RUN;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2017 18:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356624#M274141</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-05-06T18:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356627#M274142</link>
      <description>Here is the SAS log  error notes:&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; GET /talks/quick-list HTTP/1.0&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Host: &lt;A href="http://www.ted.com:443" target="_blank"&gt;www.ted.com:443&lt;/A&gt;&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept: */*.&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Language: en&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Charset: iso-8859-1,*,utf-8&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; User-Agent: SAS/URL&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; HTTP/1.1 404 Not Found&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Age: 0&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Security-Policy-Report-Only: script-src 'unsafe-inline'&lt;BR /&gt;      'unsafe-eval' https:; style-src 'unsafe-inline' 'self' https:; default-src&lt;BR /&gt;      'self' https: data: blob:; report-uri&lt;BR /&gt;      &lt;A href="https://error-collector.ted.com/?context=csp-report" target="_blank"&gt;https://error-collector.ted.com/?context=csp-report&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Type: text/html; charset=utf-8&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Date: Sat, 06 May 2017 18:51:10 GMT&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Server: nginx&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: _nu=1494096670.957; Expires=Thu, 05 May 2022 18:51:10 GMT;&lt;BR /&gt;      Path=/&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: _abby=Lvv8yWxjLHErXBP; Expires=Thu, 05 May 2022 18:51:10 GMT;&lt;BR /&gt;      Path=/; Domain=.ted.com&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Status: 404 Not Found&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; X-Served-By: e02; w12&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Length: 4123&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Connection: Close&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt;&lt;BR /&gt;ERROR: Invalid reply received from the HTTP server. Use the debug option for more info.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 06 May 2017 18:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356627#M274142</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-05-06T18:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356628#M274143</link>
      <description>Thank you art,&lt;BR /&gt;&lt;BR /&gt;After I run your code here is SAS log:&lt;BR /&gt;&lt;BR /&gt;23   FILENAME SOURCE URL "%STR(&lt;A href="https://www.ted.com/talks/quick-list" target="_blank"&gt;https://www.ted.com/talks/quick-list&lt;/A&gt;)" DEBUG;&lt;BR /&gt;24   DATA SOURCE2 (drop=junk);&lt;BR /&gt;25     informat junk $80.;&lt;BR /&gt;26     informat published $8.;&lt;BR /&gt;27     informat title $100.;&lt;BR /&gt;28     INFILE SOURCE LRECL=32767 DELIMITER="&amp;gt;";&lt;BR /&gt;29     INPUT @"&amp;lt;spam class='meta'"&lt;BR /&gt;30     published &amp;amp;/////junk title &amp;amp;;&lt;BR /&gt;31     title=tranwrd(scan(title,1,'&amp;lt;'),'&amp;amp;#39;',"'");&lt;BR /&gt;32   RUN;&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; GET /talks/quick-list HTTP/1.0&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Host: &lt;A href="http://www.ted.com:443" target="_blank"&gt;www.ted.com:443&lt;/A&gt;&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept: */*.&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Language: en&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Charset: iso-8859-1,*,utf-8&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; User-Agent: SAS/URL&lt;BR /&gt;NOTE: &amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; HTTP/1.1 404 Not Found&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Age: 0&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Security-Policy-Report-Only: script-src 'unsafe-inline'&lt;BR /&gt;      'unsafe-eval' https:; style-src 'unsafe-inline' 'self' https:; default-src&lt;BR /&gt;      'self' https: data: blob:; report-uri&lt;BR /&gt;      &lt;A href="https://error-collector.ted.com/?context=csp-report" target="_blank"&gt;https://error-collector.ted.com/?context=csp-report&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Type: text/html; charset=utf-8&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Date: Sat, 06 May 2017 18:54:06 GMT&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Server: nginx&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: _nu=1494096846.592; Expires=Thu, 05 May 2022 18:54:06 GMT;&lt;BR /&gt;      Path=/&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: _abby=vFKhWaq8GMJMGiy; Expires=Thu, 05 May 2022 18:54:06 GMT;&lt;BR /&gt;      Path=/; Domain=.ted.com&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Status: 404 Not Found&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; X-Served-By: e12; w12&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Length: 4123&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; Connection: Close&lt;BR /&gt;&lt;BR /&gt;NOTE: &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt;&lt;BR /&gt;ERROR: Invalid reply received from the HTTP server. Use the debug option for more info.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.SOURCE2 may be incomplete.  When this step was stopped&lt;BR /&gt;         there were 0 observations and 2 variables.&lt;BR /&gt;WARNING: Data set WORK.SOURCE2 was not replaced because this step was stopped&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Sat, 06 May 2017 18:54:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356628#M274143</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-05-06T18:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356639#M274144</link>
      <description>&lt;P&gt;Could it be that the site doesn't like SAS/URL as a user agent and responds with a 404?&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2017 19:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356639#M274144</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-06T19:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356641#M274145</link>
      <description>&lt;P&gt;&amp;nbsp;A major difference between my log and your log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yours:&amp;nbsp;&lt;SPAN&gt;GET /talks/quick-list HTTP/1.0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Mine:&amp;nbsp;GET /talks/quick-list HTTP/1.1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible that you're behind a firewall that doesn't support http/1.1 requests?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2017 19:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356641#M274145</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-05-06T19:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356647#M274146</link>
      <description>&lt;P&gt;If I change URL to &lt;A href="https://www.ted.com" target="_blank"&gt;https://www.ted.com&lt;/A&gt;/talks&amp;nbsp;it will be ok. But&amp;nbsp;that is not the url I wanted.&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2017 20:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356647#M274146</guid>
      <dc:creator>GeorgeSAS</dc:creator>
      <dc:date>2017-05-06T20:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: read url fail</title>
      <link>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356669#M274147</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10531"&gt;@GeorgeSAS&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The code&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;posted works for me as well. See below:&lt;/P&gt;
&lt;PRE&gt;NOTE: &amp;gt;&amp;gt;&amp;gt; GET /talks/quick-list HTTP/1.0
NOTE: &amp;gt;&amp;gt;&amp;gt; Host: www.ted.com:443
NOTE: &amp;gt;&amp;gt;&amp;gt; Accept: */*
NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Language: en
NOTE: &amp;gt;&amp;gt;&amp;gt; Accept-Charset: iso-8859-1,*,utf-8
NOTE: &amp;gt;&amp;gt;&amp;gt; User-Agent: SAS/URL
NOTE: &amp;gt;&amp;gt;&amp;gt; 
NOTE: &amp;lt;&amp;lt;&amp;lt; HTTP/1.1 200 OK
NOTE: &amp;lt;&amp;lt;&amp;lt; Age: 0
NOTE: &amp;lt;&amp;lt;&amp;lt; Cache-Control: max-age=0, public, s-maxage=30
NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'unsafe-eval' https:; style-src 'unsafe-inline' 'self' 
      https:; default-src 'self' https: data: blob:; report-uri https://error-collector.ted.com/?context=csp-report
NOTE: &amp;lt;&amp;lt;&amp;lt; Content-Type: text/html; charset=utf-8
NOTE: &amp;lt;&amp;lt;&amp;lt; Date: Sun, 07 May 2017 00:29:18 GMT
NOTE: &amp;lt;&amp;lt;&amp;lt; ETag: W/"bc10c663abfefcaba0aa45f32b8efbe2"
NOTE: &amp;lt;&amp;lt;&amp;lt; Server: nginx
NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: _nu=1494116958.827; Expires=Fri, 06 May 2022 00:29:18 GMT; Path=/
NOTE: &amp;lt;&amp;lt;&amp;lt; Set-Cookie: _abby=7OCod3AeLqPqydy; Expires=Fri, 06 May 2022 00:29:18 GMT; Path=/; Domain=.ted.com
NOTE: &amp;lt;&amp;lt;&amp;lt; Status: 200 OK
NOTE: &amp;lt;&amp;lt;&amp;lt; X-Content-Type-Options: nosniff
2                                                          The SAS System                                  10:29 Sunday, May 7, 2017

NOTE: &amp;lt;&amp;lt;&amp;lt; X-Served-By: e11; o11
NOTE: &amp;lt;&amp;lt;&amp;lt; X-XSS-Protection: 1; mode=block
NOTE: &amp;lt;&amp;lt;&amp;lt; Connection: Close
NOTE: &amp;lt;&amp;lt;&amp;lt; 
NOTE: The infile SOURCE is:
      Filename=https://www.ted.com/talks/quick-list,
      Local Host Name=&amp;lt;user name&amp;gt;,
      Local Host IP addr=&amp;lt;ip address&amp;gt;,
      Service Hostname Name=www.ted.com,
      Service IP addr=&amp;lt;ip address&amp;gt;,Service Name=N/A,
      Service Portno=443,Lrecl=32767,Recfm=Variable

NOTE: 1847 records were read from the infile SOURCE.&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 May 2017 00:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/read-url-fail/m-p/356669#M274147</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-05-07T00:38:28Z</dc:date>
    </item>
  </channel>
</rss>

