Desktop productivity for business analysts and programmers

Importing a CSV file

Reply
Occasional Contributor
Posts: 7

Importing a CSV file

[ Edited ]

Hi

 

I am trying to import a CSV file, here's the code I used

 

proc import datafile="\\Mac\Home\Downloads\cars_novname.csv" 
out=mydata dbms=csv replace;
getnames=no;
run;

When I execute I get this error message "Physical file does not exist........." import unsuccessful.

 

The file is very much there in the path.

 

 

 

Thanks

Ramaa

Super User
Posts: 7,762

Re: Impoting a CSV file

When SAS says "physical file does not exist", then it isn't there, period.

 

You may have a situation where you can "see" the file from your desktop, but the SAS process on the SAS server can't.

 

Tell us a little about your SAS setup (servers, operating systems)

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 19,770

Re: Impoting a CSV file

Are you using SAS UE? If so, please read the instructions on how to access a CSV file from University Edition. 

 

You have to kind of follow the links to get to the solution but it's buried here:

https://support.sas.com/software/products/university-edition/faq/SAS_accessdata_Excel.htm

 

In general, place the file in your myfolders created at set up, then navigate to that folder in SAS UE using Server Files & Folders Pane. Then right click the file and under properties it will have the full path.

Occasional Contributor
Posts: 7

Re: Impoting a CSV file

Hi

 

Just to clarify  ai am not accessing a CSV file fro UE, I pasted the code I found on google.

 

I tweaked the code to pick the file from Shared drive

 

Thanks

Ramaa

Super User
Posts: 7,762

Re: Impoting a CSV file


Ramabc3 wrote:

Hi

 

Just to clarify  ai am not accessing a CSV file fro UE, I pasted the code I found on google.

 

I tweaked the code to pick the file from Shared drive

 

Thanks

Ramaa


Then we need the answer to my previous post.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 4 replies
  • 283 views
  • 1 like
  • 3 in conversation