Please provide SASLOG output with the exact error condition you are receiving, as well as your code. Also, your SAS version info (include service pack level) would be helpful, as well as the "local" and "foreign" operating platform would be most helpful.
Have a look at the supplied SAS DOC link - there are special considerations using DBMS=EXCEL to consider (LIBNAME statement, not FILENAME). Also, one will assume that there is at least one blank character between "Fred01" and "outfile=".
Lastly, you may want to start simple with a DATA step to "output" a sequential file to the remote/foreign FTP destination -- just to verify whether the problem is related to your FTP authority (at the remote host) or some issue with PROC EXPORT. First though, you need to review the DOC and find/resolve suitable compatibility issues with your code. Also, there are technotes and technical papers (SUGI, SGF) at the SAS support website http://support.sas.com/ for reference.
Have you tried to create the excel file in the SAS current directory, and then do the ftp from a command prompt with same parameter as you use in the code?
Does ftp.example.com really exist? I'm behind a firewall that doesn't allow me to ping ftp sites outside.
i don't think you may write directly on another server an Excel file
filename create ftp 'testftp.xls'
host='marg.rech.ine.fr' rcmd='type i'
user='andre' pass='xxxxxxx' recfm=v debug;
proc export data=sashelp.class outfile=create dbms=EXCEL replace;
SHEET = "data1" ;run;
and the result give
NOTE: 220 Service de transfert de fichiers (FTP)
NOTE: <<< 220 Service de transfert de fichiers (FTP)
NOTE: >>> USER andre
NOTE: <<< 331 Please specify the password.
NOTE: >>> PASS XXXXXXXX
NOTE: <<< 230 Login successful.
NOTE: >>> PORT 173,16,20,79,11,32
NOTE: <<< 200 PORT command successful. Consider using PASV.
NOTE: >>> TYPE A
NOTE: <<< 200 Switching to ASCII mode.
NOTE: >>> PWD
NOTE: <<< 257 "/home/users/andre"
NOTE: >>> type i
NOTE: <<< 200 Switching to Binary mode.
NOTE: >>> RETR testftp.xls
NOTE: <<< 550 Failed to open file.
ERROR: Physical file does not exist, testftp.xls.
there is a gap between the internal production of SAS which is ok
and the link between the pc and the server for an excel file
as it is working perfect for a cport file
NOTE: User andre has connected to FTP server on Host marg.rech.ine.fr .
NOTE: Proc CPORT begins to transport data set SASHELP.CLASS
NOTE: The data set contains 5 variables and 19 observations.
Logical record length is 40.
NOTE: <<< 226 File receive OK.
NOTE: >>> QUIT
NOTE: PROCEDURE CPORT used (Total process time):
real time 0.57 seconds
cpu time 0.03 second
Try another method and forget this one
Before sp4, was Sas Institute constructing a special solution for exporting excel
file to a pc from a linux or unix and the rules were special.
This indicate that it was not easy to threat the binary pf Microsoft