SAS University Edition - Reading Files From Hard Drive Problem

Occasional Contributor
Posts: 13

SAS University Edition - Reading Files From Hard Drive Problem


I have seen this question in different forms but here is the scenario.  I have installed SAS University Edition on an external hard drive and would like for the program to read txt files from either the external hard drive or the hard drive on my computer.  It seems to append a path to the beginning of each file name that I do not understand.  I cannot see any setup file where this would be changed.  Here is the error:


42 ;


44 %let path=C:/;

45 infile "path/Pgm1ExtInp.txt";




ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/path/Pgm1ExtInp.txt.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.LISTINP may be incomplete. When this step was stopped there were 0 observations and 5 variables.

WARNING: Data set WORK.LISTINP was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

  real time 0.00 seconds

  cpu time 0.00 seconds

The highlighted path I do not find.  I have also tried to put it on the same directory as the program and used:

infile "E:\SAS University Edition Download\SASUniversityEdition\myfolders\sasuser.v94\Pgm1ExtInp.txt"

but again it appends the highlighted path to the front.

How can I disable or change that default so that I can read that file as input?

All help is appreciated.  Thanks.


Posts: 8,743

Re: SAS University Edition - Reading Files From Hard Drive Problem


  Please read this previous forum posting:

  The bottom line is that you are getting this message:

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/path/Pgm1ExtInp.txt.

because your version of SAS University Edition is looking for the file *INSIDE* the virtual machine. that location in pink above is the "inside the VM" default path. So SAS is appending your INFILE location with the "inside" location. You used an INCORRECT infile statement and so, SAS had no choice but to look *INSIDE* the VM for the file.

  Here are your mistakes:

1) you specified &path incorrectly (you had %let path=c:/) but, the SAS University Edition does not "directly" read from your C drive or your E drive

2) you omitted an & from the reference in your INFILE statement -- even IF you had specified the path correctly (such as %let path=/folders/myfolders/somedata), in your infile statement, you omitted the leading &. So you had this:

DATA LISTINP;  <--- usually, this comes AFTER the %LET statement

%let path=C:/;  <--- this is wrong because SAS UE won't read from your C: drive

infile "path/Pgm1ExtInp.txt";  <-- this is wrong because you left off the & on path

and you should have had something like this:

%let path=/folders/myfolders/somedata;


infile "&path/Pgm1ExtInp.txt";   <--- notice the &path

3) it probably means you didn't set up shared folders or shortcuts as described in the link above. The above previous forum posting explains how SAS University Edition does not talk directly to your computer. You use your virtualization software - -either Virtual Box or VM Ware -- to set up "shared folders" or shortcut locations. Then, you refer to those with the naming convention described in many, many places on the forum and in the documentation for the Quick Start Guide.

  For example, one of the very last steps in the setup instructions is for you to set up shared folders. So, for example, if you have this directory on your C: drive:

C:\SASUniversityEdition then you are instructed to make a "sub-folder" called myfolders under that location:


  And THEN, you are not done yet. THEN, you need to define that location to your VirtualBox or VMware player as a "shared folder" location. Once you do that, you can put files in that location and you can make subfolders under that location. So now, let's assume that you have made a subfolder called "somedata" -- and you have put a file called Pgm1ExtInp.txt in that location. So this is what you see in Windows Explorer:


however, in the SAS Studio interface to SAS University Edition you would NOT code this C:\ drive location. instead, you would code:


The color coding in the 2 path names above is meant to show you how each piece of the physical name, as seen on Windows (if you put the file in your shared folder location) will correspond to how you specify the path for SAS University Edition.

  So then if you have a %LET statement to set up a macro variable, so you do not have to keep typing the whole long path, then your code would be something like this:

%let path=/folders/myfolders/somedata;


infile "&path/Pgm1ExtInp.txt";   


alternately, you could code the full University Edition path in the INFILE statement:

infile "/folders/myfolders/somedata/Pgm1ExtInp.txt"; 

  As you can see from the screenshots that have been posted above and on some of these other forum postings, when you get the path right for your shared folders or shortcuts, SAS can read the data files.


Here are some other useful forum postings:

INFILE statement for PRG1 on Univ Edition: (example country.dat) (example country.dat) (infile in general)


Reading Excel files on Univ Edition: (example custfm.xls)


LIBNAME statement on Univ Edition:

Occasional Contributor
Posts: 8

Re: SAS University Edition - Reading Files From Hard Drive Problem

Hi Cynthia,

I just installed SAS University edition, followed instruction on how to set up shared folder.The VM has it set as

K:\SASUniversityEdition\myfolders (I show it in attached file).


I following your path 1 on setting  an infile statement according to your recomendations, and  here is very simple code I am running:


data veg;
Infile "folders/myfolders/veggies.txt";
input Name $ Code $ Days Number Price;
CostPerSeed = Price / Number;


Still I am getting this  error:

56 title "SAS Prog to read veggies data";
57 data veg;
58 Infile "folders/myfolders/veggies.txt";
59 input Name $ Code $ Days Number Price;
60 CostPerSeed = Price / Number;
61 run;
ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/folders/myfolders/veggies.txt.
Does myfolder has to be on C: drive only? Appreciate your answer.


Posts: 8,743

Re: SAS University Edition - Reading Files From Hard Drive Problem


  Please reread my original posting carefully. My examples all show /folders/myfolders (with a / in front of folders) and your example does not show a leading slash at the beginning of the path. The beginning slash is required.


New Contributor
Posts: 4

Re: SAS University Edition - Reading Files From Hard Drive Problem

For the SAS university edition virtual application  , it thinks you are on a unix machine .

-> create 'myfolders' as per the install document.

-> got to Server files and folders . under your folder there will be a ser folder .. something like 'sasuser.v94'

-> right click on 'sasuser.v94' and select upload files .

-> upload all the files , and you will see the files under the user folder.


you can useinfile stement like this in your code

 => infile "/folders/myfolders/sasuser.v94/mydata.txt";

Ask a Question
Discussion stats
  • 4 replies
  • 4 in conversation