Learning SAS? Welcome to the exclusive online community for all SAS learners.

CSV File Import

Reply
Regular Learner
Posts: 1

CSV File Import

I am trying to import an CSV into SAS university edition. I am using code as mentioned below. 

 

data getdata;

infile 'D:\bankdata.csv'

dlm=',' dsd missover firstobs=2 lrecl=200;

input age job marital education;

proc print;

run;

 

 

i am getting an error saying physical file doesnt exist.raw data file was in excel format and i converted it into an csv file.

please help.

Super User
Posts: 7,854

Re: CSV File Import

Posted in reply to madhuraar

SAS UE runs inside a virtual UNIX (Linux) machine that has no access to your PC file system, with the exception of the shared folder you defined when setting up the VM. Put the file into the shared folder, and use the proper UNIX pathname syntax to read it. Most probably /folders/myfolder/bankdata.csv.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 1 reply
  • 189 views
  • 0 likes
  • 2 in conversation