Hi All,
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?
#!/bin/bash
WINDOWS_SERVER=sasftp001
USER=sasdemo
PASSWORD=abc123
ftp -in <<EOF
open $WINDOWS_SERVER
user $USER $PASSWORD
ascii
lcd /sas/sasdata/data/myfolder
put test.txt
cd /WindowsFolder/App/Data
close
EOF
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;
data _null_;
infile src(test.txt) truncover;
input;
file target(test.text);
put _infile_;
run;
Thanks,
Albert0