DATA Step, Macro, Functions and more

Library/file do not exist?

Reply
New Contributor
Posts: 4

Library/file do not exist?


I am just getting started with the SAS University Edition on a Windows 7 machine.
I am getting a warning that the library does not exist even though it shows up in the library pane. I am also getting an error message that the physical file does not exist even though it does. I used copy and paste operations in order to make sure I did not make a typo.
I realize that in the code I am displaying I am writing to the work library.
Can someone please help me debug?
Thanks.
Code
libname ch5a "C:\SASUniversityEdition\myfolders\Base Chapters\Chapter 5";
filename data1 "C:\SASUniversityEdition\myfolders\Base Chapters\Chapter 5\ch5a.txt";
data sas1;
infile data1;
input ID 1-3 Name $ 5-7 Salary 10-12;
run;

proc print data = sas1;
run;
Log file
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
57
58 libname ch5a "C:\\SASUniversityEdition\\myfolders\\Base Chapters\\Chapter 5";
NOTE: Library CH5A does not exist.
59 filename data1 "C:\\SASUniversityEdition\\myfolders\\Base Chapters\\Chapter 5\\ch5a.dat";
60 data sas1;
61 infile data1;
62 input ID 1-3 Name $ 5-7 Salary 10-12;
63 run;

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/C:\\SASUniversityEdition\\myfolders\\Base Chapters\\Chapter
5\\ch5a.dat.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SAS1 may be incomplete. When this step was stopped there were 0 observations and 3 variables.
WARNING: Data set WORK.SAS1 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds


64
65 proc print data = sas1;
66 run;

NOTE: No observations in data set WORK.SAS1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds


67
68
69
70 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
82

 

 

 

Respected Advisor
Posts: 3,895

Re: Library/file do not exist?

SAS University Edition runs on a virtual machine. That's like a separate computer "inside" your computer. 

 

If you look at the file paths: They are UNIX/Linux and not Windows. In order to use something on you C drive you must map this C drive to your virtual machine. 

Here a link to a posting which explains this better. https://communities.sas.com/t5/SAS-Analytics-U/how-to-use-own-data-in-SAS-university-edition/m-p/174...

Ask a Question
Discussion stats
  • 1 reply
  • 245 views
  • 0 likes
  • 2 in conversation