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.
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.
Looks like a case senitivity issue to me. Make sure your path and file are correct in terms of capitalization.
Typo.
It's myfolders
You're missing the s.
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
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?
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?
Hi,
Herewith attached the log, Shared folder Screenshot and File Resides Path Screenshot.
Even I have restarted the VM.
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.
Hi Reeza,
Thanks for your help... Now I can able to access External file from SAS Studio.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.