DATA Step, Macro, Functions and more

Error in Reading Text file in SAS University Edition

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 101
Accepted Solution

Error in Reading Text file in SAS University Edition

[ Edited ]

Hi,

 

I am keen to learn Base SAS, so I have downloaded Oracle VM VIrtual Box and Sas University Edition for my Learining and Practical Purpose.

 

I have confiured the Oracle VM Virtual Box and created a folder in C Drive as "C:\SASUniversityEdition\myfolders\Test" and configured as Shared folder in ORacle VM(Setting---> Shared folder).

 

I have created a text file(Emp_test) in  C:\SASUniversityEdition\myfolders\Test and tried to access through SAS Studio

 

data emp_test;
infile '/folders/myfolder/Test/emp_test.txt';
input emp_no emp_name $;
run;

proc print data=emp_test;
run;

 

But the Base SAS code throws an error as 

 

ERROR: Physical file does not exist, /folders/myfolder/Test/emp_test.txt.

 

Request to help me to overcome this issue. Thanks in advance.


Accepted Solutions
Solution
‎04-20-2017 06:52 AM
Super User
Posts: 19,791

Re: Error in Reading Text file in SAS University Edition

Posted in reply to Helannivas

You should set the shared folder to the myfolders not the Test directory, you've set it to the Test directory. 

You can use this, but it's a different structure. I suggest setting it to myfolders first to get the basics going. 

 

Your code should work after this is fixed. 

 

View solution in original post


All Replies
PROC Star
Posts: 307

Re: Error in Reading Text file in SAS University Edition

Posted in reply to Helannivas

Looks like a case senitivity issue to me. Make sure your path and file are correct in terms of capitalization.

Super User
Posts: 19,791

Re: Error in Reading Text file in SAS University Edition

Posted in reply to Helannivas

Typo.

It's myfolders 

You're missing the s. 

 

 

Frequent Contributor
Posts: 101

Re: Error in Reading Text file in SAS University Edition

Even I have changed the code like below

 

data emp_test10;
infile '/folders/myfolders/Test/Emp_test.txt'
dlm=',';
input emp_no emp_name $;
run;
proc print data=emp_test10;
run;

 

But still getting the same error

PROC Star
Posts: 307

Re: Error in Reading Text file in SAS University Edition

Posted in reply to Helannivas

To me that error means that the file is not there, so double check the path and file name and be sure to make sure that the case is correct?

Super User
Posts: 19,791

Re: Error in Reading Text file in SAS University Edition

Posted in reply to Helannivas

Post your full log.

Also, include snapshots of your myfolders and shared folders set up, it's possible something went wrong there.

Did you restart your VM after setting up the shared folders?

Frequent Contributor
Posts: 101

Re: Error in Reading Text file in SAS University Edition

Hi,

 

Herewith attached the log, Shared folder Screenshot and File Resides Path Screenshot.

 

Even I have restarted the VM.File Resides path.png Shared Folder Set up.png

Solution
‎04-20-2017 06:52 AM
Super User
Posts: 19,791

Re: Error in Reading Text file in SAS University Edition

Posted in reply to Helannivas

You should set the shared folder to the myfolders not the Test directory, you've set it to the Test directory. 

You can use this, but it's a different structure. I suggest setting it to myfolders first to get the basics going. 

 

Your code should work after this is fixed. 

 

Frequent Contributor
Posts: 101

Re: Error in Reading Text file in SAS University Edition

Hi Reeza,

 

Thanks for your help... Now I can able to access External file from SAS Studio.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 233 views
  • 2 likes
  • 3 in conversation