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
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 / .
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)
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)
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
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.