BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm trying to automate a current process we are running and would like to know how to ftp a zip file from a clients ftp site to my local hard drive using SAS code. Any help will be GREATLY appreciated!!!
1 REPLY 1
deleted_user
Not applicable
I found a work around using a .bat file if anybody is interested. It creates a table, exports it as a .bat file, and executes it. This worked good for me since my file is named with a date that changes every week.

DATA lib.table;
INPUT rem $ 1-50;
CARDS;
@echo off
cd\
d:
cd \directory
> my.ftp echo o ftp.address.com
>> my.ftp echo user
>> my.ftp echo password
>> my.ftp echo bin
>> my.ftp echo cd directory
>> my.ftp echo get file.zip
>> my.ftp echo quit
ftp -s:my.ftp
exit
;
RUN;

proc export data = lib.table
outfile = 'D:\directory\table.BAT'
dbms=tab;
run;

%sysexec D:\directory\table.BAT;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 866 views
  • 0 likes
  • 1 in conversation