DATA Step, Macro, Functions and more

get file from FTPS site

Reply
Frequent Contributor
Posts: 87

get file from FTPS site

Hi ,

 

I try to get a file from a FTPS site. Until now no luck.  I can connect to the server from the sas serves filezilla.

we run sas 9.04.01M3P062415.

 

When I run the below code from SAS EG/SAS DI the ftps server seems to time out

 

options set=SAS_FTP_AUTHTLS="1";

 

filename Src_file ftp 'test.txt'

user='myuser' pass='xxxxxx' host='ftps.FFF.XX' PORT=990 debug

 

;

 

 

 

filename Tar_file "C:\test.txt";

 

data _NULL_;

INFILE Src_file;

INPUT;

File Tar_file ;

PUT _INFILE_ ;

run;

 

Thanks in advance.

Frequent Contributor
Posts: 87

Re: get file from FTPS site

I get the following message now:

 

NOTE: 500 OOPS: error:00000000:lib(0):func(0):reason(0)

NOTE: <<< 500 OOPS: error:00000000:lib(0):func(0):reason(0)

NOTE: >>> AUTH TLS

NOTE: <<< 500 OOPS: priv_sock_get_cmd

WARNING: Validate the FTP server accepts TLS authentication before using the AUTHTLS option.

ERROR: Invalid Reply received for the AUTH TLS command.

NOTE: The file TAR_FILE is:

.....

 

Super User
Posts: 9,569

Re: get file from FTPS site

Filename ftp is for the standard, unencrypted FTP protocol. FTPS is encrypted, and there is no filename ftps AFAIK.

Use filename sftp to use the ssh protocol.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Frequent Contributor
Posts: 87

Re: get file from FTPS site

Posted in reply to KurtBremser

The FTP site is FTPS and not SFTP. Is there a way from sas to get files transferred? It seems to time out.

Super User
Posts: 9,569

Re: get file from FTPS site

A quick Google search for "sas and ftps" reveals this: http://support.sas.com/kb/56/154.html as the first hit.

Do you have the necessary requirements in SAS (9.4 TS1 M3 or 9.4 TS1M2 with hotfix), and does the FTPS server support the required options?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 4 replies
  • 160 views
  • 1 like
  • 2 in conversation