- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello team of knowledge base,
I am having an issue where I am self learning sas programming essentials 1 module two-access data. When I give the correct file path to Create the library , I keep getting an error..libname does not exist.
the syntax I am using is libname pg1 "file path" and the folder I am accessing is epg194/data.
Can someone tell me what I am doing incorrectly.
thanks,
RS
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 libname pg1 "SAVESSD/Users/Rahulsave/downloads/epg194/data";
NOTE: Library PG1 does not exist.
74 run;
75
76
77 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
89
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You don't want to use a RELATIVE path. Especially when running SAS via SAS/Studio where you have no control over what the current directory that the SAS process is using.
On Unix ABSOLUTE paths must start with the root node. So the path must start with / .
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
PG1 libref created but has not data in it. Furthermore when I try to save the program docent allow me to save anywhere in epg194. currently stored in some folders/myfolders/libname.sas ( not sure where this is from---- saw this message at base of the sas study window)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So in your SAS code you need to always use /folders/myfolders/ as the starting point for your paths. From there you should be able to see any files you put into the folder on your real machine that are in or under the folder you shared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Go the PG1 folder in the picture, right click it and select properties. Copy the path in the properties and use EXACTLY that as your path. Unless you're using a private installation of SAS I don't think your path is correct for either SAS UE or SAS On Demand for Academics.
@borivlikar wrote:
PG1 libref created but has not data in it. Furthermore when I try to save the program docent allow me to save anywhere in epg194. currently stored in some folders/myfolders/libname.sas ( not sure where this is from---- saw this message at base of the sas study window)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Please do NOT go to Libraries. Please go to Server Files and Folders. Find the EPG194/data folder. Right click on the folder IN THE SERVER FILES AND FOLDERS pane and choose Properties. Then look on the LOCATION field on the popup window. That shows you the EXACT full path location you need to use. It appears that you are using SAS University Edition in a Virtual Machine. IF (and only IF) you have defined your shared folders correctly, the path should be something like this:
libname pg1 "/folders/myfolders/EPG194/data";
IF you did NOT define your shared folders correctly, then I suggest you go back to the setup instructions for SAS University Edition and make sure you've correctly defined the shared folder location.
Whether you are using a Mac or a Windows machine, with SAS University Edition, if you have shared folders correctly defined, the "high level" part of your path should ALWAYS be: /folders/myfolders then the subfolders under that location (like EPG194) will be:
/folders/myfolders/EPG194
/folders/myfolders/EPG194/data (for the main data folder)
/folders/myfolders/EPG194/output (for the output folder)
Hope this helps,
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Make sure to follow the instructions exactly. Also make sure you are following the instructions for how you are running SAS. SAS University Edition run in a virtual machine that runs on your computer. The path you showed is more like you would get when running on full Unix system. Perhaps one of the cloud based on demand servers that SAS also provides?