05-21-2015 09:16 AM
I would like to create a permanent sas dataset with libname. But I get the following error message
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
58 LIBNAME QDATA "folders/myfolders/sasuser.v94/mystuff/";
NOTE: Library QDATA does not exist.
58 ! RUN;
60 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
Here's the code I'm using;
LIBNAME TEST "folders/myfolders/sasuser.v94/mystuff/";RUN;
PROC IMPORT DATAFILE ="/folders/myfolders/sasuser.v94/mystuff/OBESITY AND CHD.xls"
PROC PRINT DATA=WORK.CHD; RUN;
DATA TEST.CHD; SET CHD;RUN;
05-21-2015 09:52 AM
For one, I would not create a subdirectory in the sasuser.v94 directory, as this should be exclusively reserved for holding the SASUSER library.
And second, you need to create the phsical directory first to assign a libname to it.
So I suggest you first create the folder /folders/myfolders/mystuff and then do
libname QDATA '/folders/myfolders/mystuff';
Take note of the leading slash in filenames (see Unix filesystem - Wikipedia, the free encyclopedia)
05-21-2015 09:56 AM
Always use '/' in the directory path, even in Windows operating environments. So your libname statement will end up becoming
LIBNAME TEST "/folders/myfolders/sasuser.v94/mystuff/";
The SAS University Edition Help Center has more information on how to create a SAS library here.
I hope this helps you out!