<?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: List all files in URL in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97035#M27394</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. You can extract these file name from you URL firstly, then feed them to a seriers of macro variables and you can input them. Like something:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;filename x url 'http://www.hko.gov.hk/gts/time/calendar/text/';
data _null_;
 infile x length=len;
 input x $varying200. len;
 /*Code here to extract the file name you need */
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2012 02:15:33 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2012-07-05T02:15:33Z</dc:date>
    <item>
      <title>List all files in URL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97032#M27391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a url for example &lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://myserver:81/path/"&gt;http://myserver:81/path/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i open this path on an internet explorer i can see all the .txt files available in this directory. It appears as a complete list with file name,&amp;nbsp; created date etc:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to know using sas can we list out all the files present in this path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly guide or any references will also help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 18:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97032#M27391</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2012-07-02T18:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: List all files in URL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97033#M27392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an example in Arthur.T 's paper at SGF2012 (Sometimes One Needs an Option with Unusual Dates) .&lt;/P&gt;&lt;P&gt;The following is a code fragment from his Paper .&lt;/P&gt;&lt;P&gt;This remind me that I haven't see him for a long time at this forum . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;%macro getcdates;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; %do i=1901 %to 2100;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename lunar http&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.hko.gov.hk/gts/time/calendar/text/T&amp;amp;i.e.txt"&gt;http://www.hko.gov.hk/gts/time/calendar/text/T&amp;amp;i.e.txt&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format Gregorian_date yymmdd10.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile lunar dlm=' ' firstobs=3 truncover expandtabs ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input Gregorian_date : ?? yymmdd12. lunar_date &amp;amp; $40.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; day_of_week : $20.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; solar_term &amp;amp;&amp;nbsp; $40.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not missing(Gregorian_date) then output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc append base=dates data=temp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: #333333; background: none repeat scroll 0% 0% white;"&gt;&amp;nbsp; %end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 04:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97033#M27392</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-07-03T04:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: List all files in URL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97034#M27393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ksharp..&lt;/P&gt;&lt;P&gt;I already had a program like above in place ....&lt;/P&gt;&lt;P&gt;But the restriction of this is that we are assuming the Files name to be in a specified format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My concern was that if the files had random names would i be able to list all these files...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 15:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97034#M27393</guid>
      <dc:creator>NN</dc:creator>
      <dc:date>2012-07-04T15:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: List all files in URL</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97035#M27394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. You can extract these file name from you URL firstly, then feed them to a seriers of macro variables and you can input them. Like something:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;filename x url 'http://www.hko.gov.hk/gts/time/calendar/text/';
data _null_;
 infile x length=len;
 input x $varying200. len;
 /*Code here to extract the file name you need */
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 02:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/List-all-files-in-URL/m-p/97035#M27394</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-07-05T02:15:33Z</dc:date>
    </item>
  </channel>
</rss>

