|
Paul -
You need a fileref to read the file from and one where to write the file to.
Something like this (untested)
filename ftpin "c:\testftp.txt";
filename transfer ftp
'/Data_Files/testftp.txt'
user = 'itw' /*prompt*/
pass = XXXXXXX
host = 'ftp.site.com'
debug;
data _null_ ;
infile ftpin;
file transfer ;
input;
put _infile_;
run
hth
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
paulsparrow
Sent: Tuesday, June 14, 2005 2:04 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: output file by ftp from sas
I am trying to ftp a file out using SAS. Having an issue with the code
not being able to find the file. Yes the file is correctly spelled and
located as in code. Any answers?
232 filename transfer ftp
233 "c:\testftp.txt"
234 user = 'itw' /*prompt*/
235 pass = XXXXXXX
236 host = 'ftp.site.com'
237 cd = 'Data_Files'
238 debug;
239
240 data _null_ ;
241 file transfer ;
242 put ;
243 run ;
NOTE: 220 eldiablo Microsoft FTP Service (Version 4.0).
NOTE: <<< 220 eldiablo Microsoft FTP Service (Version 4.0).
NOTE: >>> USER itw
NOTE: <<< 331 Password required for itw.
NOTE: >>> PASS XXXXX
NOTE: <<< 230 User itw logged in.
NOTE: >>> PORT 10,0,15,232,8,85
NOTE: <<< 200 PORT command successful.
NOTE: >>> TYPE A
NOTE: <<< 200 Type set to A.
NOTE: >>> CWD Data_Files
NOTE: <<< 250 CWD command successful.
NOTE: >>> PWD
NOTE: <<< 257 "/itw/Data_Files" is current directory.
NOTE: >>> STOR c:\testftp.txt
NOTE: <<< 550 c:\testftp.txt: The filename, directory name, or volume
label syntax is incorrect.
ERROR: Physical file does not exist, c:\testftp.txt.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used:
real time 2.31 seconds
cpu time 0.01 seconds
|