08-23-2017 03:57 AM - edited 08-23-2017 04:00 AM
I'd like to ask your help regarding on converting the ftp code in a .sh file below to a code that can run in SAS BASE?
ftp -in <<EOF
user $USER $PASSWORD
The code above is working fine. Can everybody help me translate this one to a sas code? I created an ftp code but its not working so i tried creating the above script. Below is my SAS code :
filename src ftp 'linux path' host='abc.com.' binary dir
user = 'sasdemo' pass= "abc123";
filename tgt ftp 'windows path' host='sasftp001' binary dir user='sasdemo' pass= "abc123;
infile src(test.txt) truncover;
08-23-2017 04:14 AM
Is SAS running on one of the involved servers? This would allow a simpler filename statement for either source or target.
When reading/writing text files, avoid the binary option, and use the complete absolute pathnames in the filename statements:
filename src ftp "/linux path/test.txt" host='abc.com' user = 'sasdemo' pass= "abc123" ; filename tgt ftp "windows path\test.txt" host='sasftp001' user='sasdemo' pass= "abc123" ; data _null_; infile src; file tgt; input; put _infile_; run;
Post your log for steps that do not work.