BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kimdukes77
Obsidian | Level 7

Am getting the error "ERROR: Physical file does not exist, /testclear.zip".

 

Code is:-

 

filename rmt ftp '/testclear.zip' host='sftp.ucas.com'
user='anonymous' pass='XXXXX'
cd='/incoming/' recfm=s debug;

 

FILENAME lcl '\\par2\adi\data\STROBE\Jobs\2017\SR170601_001_BRITCO\PROJECT\RAW_DATA\testclear.zip' recfm=n;

 

data _NULL_;
N=1;
INFILE rmt NBYTE=n;
INPUT;
FILE lcl ;
PUT _INFILE_ @@;
run;

 

 

The rest of the log looks ok and file does exist and can be retrieved using FTP portal.  Can anyone help?

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
Kurt_Bremser
Super User

Remove the leading forward slash from the filename:

filename rmt ftp 'testclear.zip' host='sftp.ucas.com'
user='anonymous' pass='XXXXX'
cd='/incoming/' recfm=s debug;
kimdukes77
Obsidian | Level 7

Ok I've tried that and it still doesn't work.

 

filename rmt ftp '' host='sftp.ucas.com'
user='anonymous' pass='XXXXX'
cd='/incoming/' recfm=s debug;

FILENAME lcl '' recfm=n;

data _NULL_;
N=1;
INFILE rmt NBYTE=n;
INPUT;
FILE lcl ;
PUT _INFILE_ @@;
run;

 

 

Kurt_Bremser
Super User

The source file is simply not there. I just did this:

$ ftp sftp.ucas.com
Connected to sftp.ucas.com.
220 UKPASS Secure FTP Server
Name (sftp.ucas.com:XXXXX): anonymous
331 Password required for anonymous.
Password: 
230 Login OK. Proceed.
ftp> cd /incoming/
250 Folder changed to "/incoming".
ftp> ls
200 Command okay.
150 Opening ASCII mode data connection for file list.
jb.txt
226 Transfer complete. 8 bytes transferred. 8 Bps.
ftp> quit

As you can see, there's only one file named jb.txt there.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 3 replies
  • 1456 views
  • 0 likes
  • 2 in conversation