<?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: filename ftp list with proxy server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336996#M76459</link>
    <description>&lt;P&gt;not sure if I understand it correctly, but I would conclude that it simply will not work...&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 14:26:55 GMT</pubDate>
    <dc:creator>niemannk</dc:creator>
    <dc:date>2017-03-01T14:26:55Z</dc:date>
    <item>
      <title>filename ftp list with proxy server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336972#M76450</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename ftpdir ftp  ' ' list 
				user='username@ftp.server.com'
				pass='topsecret' 
				host='our.proxy.server'
				port=8080
				cd='download/' PASSIVE debug;

data ftp_dir (drop=str: hh) ;
   infile ftpdir dsd dlmstr=' '  MISSOVER;
   informat strDate $8.  strtime $7.   bytes 8.  name $50. ; 
   input  strDate   strtime  bytes name ;
   format Datetime datetime20. hh 2.  date ddmmyy8.;
		date=MDY(substr(strDate,1,2)*1,substr(strDate,4,2)*1,substr(strDate,7,2)*1);
	 if substr(strtime,6,2)='PM' then hh=substr(strtime,1,2)+12; else hh=substr(strtime,1,2)*1;
	Datetime=DHMS(	  date
					, hh
					, substr(strtime,4,2),0);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS takes this filename statement, but then the datastep end with a critical error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ERROR:  An exception has been encountered.
Please contact technical support and provide them with the following
       traceback information:

The SAS task name is [DATASTEP]
ERROR:  Read Access Violation DATASTEP
Exception occurred at (09264F14)
Task Traceback
Address   Frame     (DBGHELP API Version 4.0 rev 5)
0000000009264F14  000000000B82F120  sasdsx:tkvercn1+0x23ED4
&lt;/PRE&gt;
&lt;P&gt;I tried to take the passive parameter out, but same error. It just doesn't want to read the ftp directory. I am absolutley clueless.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 13:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336972#M76450</guid>
      <dc:creator>niemannk</dc:creator>
      <dc:date>2017-03-01T13:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: filename ftp list with proxy server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336978#M76452</link>
      <description>&lt;P&gt;filename ftp is for direct connections to the ftp server port, it does not supply the necessary information that tells the "everything"-proxy which protocol is being used. By default the proxy expects http.&lt;/P&gt;
&lt;P&gt;You may have to have the ftp port opened on the firewall for outgoing connections. Then you will also need the passive option.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 13:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336978#M76452</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-01T13:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: filename ftp list with proxy server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336996#M76459</link>
      <description>&lt;P&gt;not sure if I understand it correctly, but I would conclude that it simply will not work...&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 14:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/336996#M76459</guid>
      <dc:creator>niemannk</dc:creator>
      <dc:date>2017-03-01T14:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: filename ftp list with proxy server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/337260#M76576</link>
      <description>&lt;P&gt;After further research, I think your method should work, but it can only work if your proxy is also a FTP proxy.&lt;/P&gt;
&lt;P&gt;To test this, start Windows ftp (without parameters).&lt;/P&gt;
&lt;P&gt;Enter the following:&lt;/P&gt;
&lt;P&gt;open our.proxy.server 8080&lt;/P&gt;
&lt;P&gt;username@ftp.server.com (when prompted for username)&lt;/P&gt;
&lt;P&gt;topsecret (when prompted for password)&lt;/P&gt;
&lt;P&gt;if you don't get a connection, your proxy probably doesn't support FTP connections&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that works, open a track with SAS Technical Support, as you may have a SAS-internal problem&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 08:26:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/337260#M76576</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-02T08:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: filename ftp list with proxy server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/338702#M77186</link>
      <description>&lt;P&gt;nothing works. I think it is the proxy server that doesn't know ftp. However using powershell I can use the Webclient Object &amp;amp; Method "downloadFile".&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 08:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/filename-ftp-list-with-proxy-server/m-p/338702#M77186</guid>
      <dc:creator>niemannk</dc:creator>
      <dc:date>2017-03-07T08:26:10Z</dc:date>
    </item>
  </channel>
</rss>

