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
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...
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.