BookmarkSubscribeRSS Feed
Chen411
Calcite | Level 5

I want to import a csv file. I'm sure the file is in the correct folder.

Could anyone help me understand the following messages in the log?

 

11 proc import out=data1
12 datafile="C:\Users\Michelle\Desktop\報告ㄦ\大四\運統\作業3\DB1B2017Q12"
13 dbms= csv replace;
14 getnames=yes;
15 run;

ERROR: Physical file does not exist, C:\Users\Michelle\Desktop\報告ㄦ\大四\運統\作業3\DB1B2017Q12.
ERROR: Import unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.06 秒
cpu time 0.06 秒

 

 

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

If SAS says the file is not there, it is not there. Period 🙂 

 

It seems to me though, that you are missing at least a .csv extention in your datafile option. 

ugada
Calcite | Level 5

You probably have the file open somewhere. Close the file and try again.

andreas_lds
Jade | Level 19

Is the sas session running on your computer or on a server? If it is not running on your computer, you have to move the file to a location that is accessible by the sas server.

Patrick
Opal | Level 21

If the SAS SERVER component where your script executes isn't installed on your computer then it has most likely no access to a file on your desktop.

 

If above is the case then you need either to upload the file onto the server where SAS executes and then use the server path in your proc import script. 

 

If you're using the SAS EG or Studio CLIENT then you can also use the client's import wizard. In EG that would be under menu File/Import Data.

Because that's using the client installed on your computer you will have access to a file on your desktop. The client does then the conversion and upload to SAS for you.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 1591 views
  • 0 likes
  • 5 in conversation