Hi,
I am new to SAS and working through the SAS Programming 1: Essentials training. I am using SAS Enterprise Guide and I am connected to a SAS server. I am trying to set up my practice files. I am using the instructions provided for SAS Windowing Environment. I copied the folder into the SAS drive and replaced the FILEPATH with the actual path for the folder. When I run the program, I get this error "LIbrary PG1 does not exist.". I have seen answers for similar posts but I am unable to figure out why this is not working. Please see the code below. I would really appreciate if someone can help with this.
%let path = F:\NSK\SAS_Training\EPG194;
libname PG1 "&path";
Thanks,
NSK
Try using the UNC path instead of a mapped drive letter when you submit the LIBNAME statement from Enterprise Guide.
If you are running EG connected to a server then the SERVER has to see the path. If the server does not have an F drive mapped then it "doesn't exist".
You need to ensure that the path is acceptable to the server. If the location is on a network shared drive or such you may need to use a different reference from the server's perspective. If the F drive is a local drive to your computer you will need to work with your SAS admin and/or IT folks to set up a share or something. Or use a different location both you and the server can access.
Thank you for your quick response. The F drive is mapped to the SAS server. I am also able to see the folder in question under Servers -> SASApp -> Files on the left hand of the SAS Enterprise Guide.
Can you think of anything else that could be an issue?
Is the path the same? Your SASapp server is running Windows also?
When you run this code:
%let path = F:\NSK\SAS_Training\EPG194; libname PG1 "&path";
Do you get a result in the log that looks like:
NOTE: Libref PG1 was successfully assigned as follows:
If not, then the library wasn't assigned and doesn't exist and you should perhaps post the log from running the LIBNAME statement.
Please see the log below:
1 %_eg_hidenotesandsource;
5 %_eg_hidenotesandsource;
28
29 %let path = F:\NSK\SAS_Training\EPG194;
30
31 libname PG1 "&path";
NOTE: Library PG1 does not exist.
32
33 %_eg_hidenotesandsource;
45
46
47 %_eg_hidenotesandsource;
50
Try using the UNC path instead of a mapped drive letter when you submit the LIBNAME statement from Enterprise Guide.
Thank you very much. I didnt know what UNC path is. I looked it up and replaced the F drive with the UNC path. And I cant believe but it worked.
1 %_eg_hidenotesandsource;
5 %_eg_hidenotesandsource;
28
29 %let path = \\server1088\Files\NSK\SAS_Training\EPG194;
30
31 libname PG1 "&path";
NOTE: Libref PG1 was successfully assigned as follows:
Engine: V9
Physical Name: \\server1088\Files\NSK\SAS_Training\EPG194
32
33 %_eg_hidenotesandsource;
45
46
47 %_eg_hidenotesandsource;
50
I was going crazy here. I finally got it after copying my folder's path and pasting it into the code. You guys opened my eyes.
I am having this issue too, even after reading this forum.
Initially I ran this as a tutorial I was following told me to:
First of all, are you connecting to a local SAS server from Enterprise Guide (Base SAS is installed on the same PC as Enterprise Guide and the connection profile is 'No Profile Selected'), or are you connecting to a remote SAS server? If a remote server, is the operating system Windows or Unix? When connecting to a remote SAS server from Enterprise Guide, the server needs to be able to access the path you are specifying on the LIBNAME statement. For example, a remote server will most likely not be set up to access the files on your local PC, but it may be able to access a shared network drive.
A UNC (universal naming convention) path uses double slashes or backslashes to precede the name of the computer. The path (disk and directories) within the computer are separated with a single slash or backslash, as in the following examples. Note that in the DOS/Windows example, drive letters (c:, d:, etc.) are not used in UNC names.
//servername/path Unix
\\servername\path DOS/Windows
For example, you may have a mapped drive on your PC that is using the drive letter 'F'. 'F' is actually mapped to a network server named server123 and a directory named SAS_Files. Your training files are located in the subdirectory EGP194 within SAS_Files. So instead of using the path of 'F:\EGP194', the UNC path would be '\\server123\SAS_Files\EGP194'. Does that help?
Hi All
I am encountering the same issue where I am assigning a library with a UNC path and the assigning of the libraries doesn't show any error but the log in the enterprise edition says that the library does not exist.
Could you please help?
Kind Regards
Siddharth
I have tried to copy the path to my folders but it still gives error someone should please help. I don't know if there is something that I an doing wrong.
I have the same issue. The files are on my c:\ drive. I am using Windows 10 as the OS.
I entered:
%let path=c:\SASUniversityEdition\myfolders\EPG194\;
and I get error Library PG1 does not exist.
I can't see what I am doing wrong.
I also tried
\\localhost\c$\SASUniversityEdition\myfolders\EPG194\;
same error.
I would appreciate it assistance with what I would think would be a simple task.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.