<?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: Downloading data from web page in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575787#M162929</link>
    <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2019 12:52:41 GMT</pubDate>
    <dc:creator>AlexeyS</dc:creator>
    <dc:date>2019-07-23T12:52:41Z</dc:date>
    <item>
      <title>Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575640#M162880</link>
      <description>&lt;P&gt;Hello, I need help. I want to download data from the next url :&amp;nbsp; &lt;A href="https://www.eurocontrol.int/sites/default/files/2019-07/ur-2019-07-update.txt" target="_self"&gt;eurocontrol&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do it? Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 05:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575640#M162880</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2019-07-23T05:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575641#M162881</link>
      <description>Contact the site, they will have set up a service you can use maybe by using proc soap or proc http, but that depends on what they offer.</description>
      <pubDate>Tue, 23 Jul 2019 05:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575641#M162881</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-07-23T05:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575674#M162894</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename in url "https://www.eurocontrol.int/sites/default/files/2019-07/ur-2019-07-update.txt";

data want;
infile in dlm='09'x dsd;
input
  code :$2.
  date1 :yymmdd10.
  date2 :yymmdd10.
  number1
  number2
  code2 :$3.
  name :$40.
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that this will only work if you have the proper certificate chain on your SAS server so that https works.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 07:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575674#M162894</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-23T07:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575696#M162905</link>
      <description>&lt;P&gt;Thank you very much. Your code is really work. But when I try to read the first or second month, I got an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-01.txt" target="_blank" rel="noopener"&gt;https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-01.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-02.txt" target="_blank" rel="noopener"&gt;https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-02.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I see, the problem is with number2 in your example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I understand, it can be two different delimiters, sometimes tab delimiter, and sometimes blank delimiter.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 09:05:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575696#M162905</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2019-07-23T09:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575700#M162908</link>
      <description>&lt;P&gt;That's because they use a dot for decimals in the first file, and a comma in the second. A typical violation of the structural "agreement".&lt;/P&gt;
&lt;P&gt;If that change was not documented, I would alert the source to that. If it is documented, you will have to adapt the code so that it can deal with it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
infile in dlm='09'x dsd;
input
  code :$2.
  date1 :yymmdd10.
  date2 :yymmdd10.
  number1
  _number2 :$10.
  code2 :$3.
  name :$40.
;
if indexc(_number2,',')
then number2 = input(_number2,commax10.);
else number2 = input(_number2,10.);
drop _number2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jul 2019 09:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575700#M162908</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-23T09:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575715#M162911</link>
      <description>&lt;P&gt;You are right. But still I have a problem, when I try to read month 1 and 2.&lt;/P&gt;&lt;P&gt;You can see, that code2 variable in some cases inside name&amp;nbsp; variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried multiple delimiters, like&lt;/P&gt;&lt;P&gt;dlm=' ' ||&amp;nbsp; '09'x;&lt;/P&gt;&lt;P&gt;dlm=dlm,&lt;/P&gt;&lt;P&gt;but it doesn't work me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-01.txt" target="_blank" rel="noopener"&gt;https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-01.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-02.txt" target="_blank" rel="noopener"&gt;https://www.eurocontrol.int/sites/default/files/2019-06/ur-2019-02.txt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 09:45:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575715#M162911</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2019-07-23T09:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575732#M162917</link>
      <description>&lt;P&gt;That's because the file is not properly structured. In line 6 of 2019-01, there's a blank separating number2 and code2 instead of a tab. The people there clearly need to get their act together. If everything else is built as sloppily as this, I would not trust this data at all. Who knows what other errors are hidden in there.&lt;/P&gt;
&lt;P&gt;Note that we can't use blanks as additional delimiters, as name often contains blanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS 2019-02 looks much better, so it may be that the problems were corrected from there on.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 10:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575732#M162917</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-23T10:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575756#M162924</link>
      <description>&lt;PRE&gt;filename in url "https://www.eurocontrol.int/sites/default/files/2019-07/ur-2019-07-update.txt";
proc import datafile=in out=want dbms=tab replace;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jul 2019 11:58:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575756#M162924</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-07-23T11:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading data from web page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575787#M162929</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 12:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Downloading-data-from-web-page/m-p/575787#M162929</guid>
      <dc:creator>AlexeyS</dc:creator>
      <dc:date>2019-07-23T12:52:41Z</dc:date>
    </item>
  </channel>
</rss>

