BookmarkSubscribeRSS Feed
Sk1_SAS
Obsidian | Level 7

Hi Team,

 

I need help to download file in FTP server with password, im trying but is not working.

 

Full FTP link example: ftponline.zipcode.com/file/d/files/file.zip

 

My code:

 

filename teste ftp 'file.zip'

cd='file/d/files/'

host='ftponline.zipcode.com'

user='SAS_HELP'

pass='XXX'

passive binary recfm=s;

 

 

data _null_;

infile teste;

input;

put _infile_;

run;

 

 

Log:

 

ERROR: Open failed for file TESTE

ERROR: Connection refused.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: DATA statement used (Total process time):

real time 13.13 seconds

user cpu time 0.01 seconds

system cpu time 0.01 seconds

memory 770.46k

OS Memory 18848.00k

Timestamp 10/28/2019 10:52:57 AM

Step Count 8 Switch Count 44

Page Faults 0

Page Reclaims 364

Page Swaps 0

Voluntary Context Switches 175

Involuntary Context Switches 5

Block Input Operations 0

Block Output Operations 0

 

 

 anyone knows what i need to do?

 

Thanks in advanced!!!

 

 

1 REPLY 1
Kurt_Bremser
Super User

First of all, test if an ftp connection to the server works from your SAS environment.

If you use remote, server-based SAS, log on to the SAS server with your SAS user-ID and run ftp from the commandline. Otherwise, test the ftp connection from your desktop.

Also note that you most probably have to use an absolute path for the change directory:

/file/d/files

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 651 views
  • 0 likes
  • 2 in conversation