BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Hakase102
Calcite | Level 5

Hello,

I'm having some trouble accessing data from the PG1 library for an activity in the SAS Programming 1: Essentials course. Usually when I run the code from the libname.sas program I created it populates the library without issue.

The code I in my libname.sas program is:

 

libname pg1 "/folders/myfolders/EPG194";

However when I run this what appears to be an empty PG1 library is created as per the below screenshot.

 

Screen Shot 2020-03-23 at 21.56.25.png

Can anyone tell me what I'm doing wrong here?

 

Best regards,

 

Hakase102

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  It's always a good idea to search for previous postings with similar questions, like this one: https://communities.sas.com/t5/New-SAS-User/can-t-create-libname-pg1-as-per-sas-programming-essentia... please see the suggestion I made yesterday about NOT going directly to the Libraries pane.

  Instead, please go to Server Files and Folders, find the EPG194 folder, find the data sub-folder inside that main folder. Now, right click on the data sub-folder -- in the popup window, choose Properties. When the Properties window pops up, you will see a Location -- THAT location is the full path name for your data folder.

  Inside the Programming 1 course, is a  section called Course Overview and Data Setup. That section has 5 different sets of instructions for how to run a program to MAKE all the data used in the course. When you go to the EPG194/data folder under Server Files and Folders -- you should see some xlsx and some other files, but there should be over 20 files with the file extension of .sas7bdat -- indicating SAS data sets. If you see a data sub-folder that's good, that usually means you've set up the shared folder location in University Edition correctly. However, if you do NOT see any SAS tables in the folder, then that means you still have to follow the setup instructions. If you DO see SAS tables inside the data sub-folder, then please, right click on the data sub-folder and choose Properties -- usually, on SAS University Edition in a Virtual Machine, the fully qualified path for the data folder in Programming 1 is:

libname pg1 '/folders/myfolders/EPG194/data';

 

and on SAS OnDemand for Academics:

libname pg1 '/home/<yourUserID>/EPG194/data';

 

Hope this helps,

Cynthia

View solution in original post

3 REPLIES 3
Quentin
Super User

If you browse to that folder, do you see the expected files (data sets), or is it an empty folder?  I know for the macro course, there is a program to run to create all the data sets.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
Cynthia_sas
SAS Super FREQ

Hi:

  It's always a good idea to search for previous postings with similar questions, like this one: https://communities.sas.com/t5/New-SAS-User/can-t-create-libname-pg1-as-per-sas-programming-essentia... please see the suggestion I made yesterday about NOT going directly to the Libraries pane.

  Instead, please go to Server Files and Folders, find the EPG194 folder, find the data sub-folder inside that main folder. Now, right click on the data sub-folder -- in the popup window, choose Properties. When the Properties window pops up, you will see a Location -- THAT location is the full path name for your data folder.

  Inside the Programming 1 course, is a  section called Course Overview and Data Setup. That section has 5 different sets of instructions for how to run a program to MAKE all the data used in the course. When you go to the EPG194/data folder under Server Files and Folders -- you should see some xlsx and some other files, but there should be over 20 files with the file extension of .sas7bdat -- indicating SAS data sets. If you see a data sub-folder that's good, that usually means you've set up the shared folder location in University Edition correctly. However, if you do NOT see any SAS tables in the folder, then that means you still have to follow the setup instructions. If you DO see SAS tables inside the data sub-folder, then please, right click on the data sub-folder and choose Properties -- usually, on SAS University Edition in a Virtual Machine, the fully qualified path for the data folder in Programming 1 is:

libname pg1 '/folders/myfolders/EPG194/data';

 

and on SAS OnDemand for Academics:

libname pg1 '/home/<yourUserID>/EPG194/data';

 

Hope this helps,

Cynthia

Hakase102
Calcite | Level 5

 

Thank you, Cynthia_SAS for the detailed response. That solved the problem.

Screen Shot 2020-03-24 at 7.38.00.png

It looks like the main issues was the fact that I didn't include /data in my command.

 

I looked around for some solutions but didn't quite hit what I needed. Thank you again for clearly solving this problem. I can now get back to studying. 🙂

 

Best regards,

 

Hakase102

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1939 views
  • 0 likes
  • 3 in conversation