BookmarkSubscribeRSS Feed
naspep21
Calcite | Level 5

Hey,

 

using SAS 9.2

 

Having an issue using SFTP from my Unix SAS server to a Linux server.  I have already setup my rsa key and have added it to knownhost file.  I am able to ssh without a password so that shouldn't be the issue.  However When ever i try to SFTP though SAS with the following code i get the following error:

 


FILENAME COOL SFTP "/home/myhome/cool.txt" USER='user' HOST="myhost" DEBUG;

 

DATA COOLSAS;
INFILE COOL DLM='|' DSD;
INPUT TEST $;
RUN;

 

PROC PRINT DATA=COOLSAS (OBS=100); RUN;

 

NOTE: Connected to <host>.
NOTE: sftp> cd /home/myhome/
NOTE: sftp> get cool.txt /data/SASWORK/SAS_workD88300960066_p00012/#LN00058Fetching
/home/myhome/cool.txt to /data/SASWORK/SAS_workD88300960066_p00012/cool.txt

ERROR: Physical file does not exist, /data/SASWORK/SAS_workD88300960066_p00012/#LN00058.
NOTE: The SAS System stopped processing this step because of errors.

 

The file on the remote server certainly exist, i have triple checked it.  in fact it looks like in the work library the file is actually transferred over.  However SAS never reads the file in and then for some reason is looking for this file and errors out when it cant find it  

 

ERROR: Physical file does not exist, /data/SASWORK/SAS_workD88300960066_p00012/#LN00058.

 

Thanks

8 REPLIES 8
naspep21
Calcite | Level 5

File is certainly there. In fact the file is actually transferred over to SAS to the temp Work library. However then SAS throws in This error.  

 

ERROR: Physical file does not exist, data/SASWORK/SAS_workD88300960066_p00012/#LN00058.

 

It never reads the file in after that point.

SASKiwi
PROC Star

Is that path to your WORK library in the SAS error correct - does it match the definition of your WORK library in your SAS session?

naspep21
Calcite | Level 5

yup sure does. And the file does transfer over to the correct work location...so sas is getting that part right.  But this #LN00058 file doesnt exist.  Not even sure what its doing with that file.

 

 

SASKiwi
PROC Star

I suggest you track this problem to SAS Tech Support if you haven't already done so.

Kurt_Bremser
Super User

I pointed out the message from SFTP to you. Ignoring it will not make the cause go away. The file is not where the sftp expects it on the remote server, period.

Unless you failed to post the log correctly.

naspep21
Calcite | Level 5

log was posted incorrectly and corrected above.  The file exist, the corrected question above now reflects that....thanks 

Kurt_Bremser
Super User
NOTE: sftp> get cool.txt /data/SASWORK/SAS_workD88300960066_p00012/#LN00058Fetching
/home/myhome/cool.txt to /data/SASWORK/SAS_workD88300960066_p00012/cool.txt

The crucial part is this:

Fetching
/home/myhome/cool.txt to /data/SASWORK/SAS_workD88300960066_p00012/cool.txt

(emphasis by me)

Somehow the sftp does not honor the target name and uses the source file name for the target.

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