I am doing the SAS Programming 1: Essentials course. For some reason no files apear in the pg library when i make it. The files are on my computer and i can access them in SAS from the same location by "proc import". I create the library by libname pg "myfolder\EPG1V2\data"; and it goes through in the log with no errors. No data is in the library however. I hope you can help, it is super frustrating.
The fact that you can access them with PROC IMPORT means that they are not yet SAS datasets. Via a defined library, only SAS files (datasets, views, catalogs) can be accessed.
They are .sas .csv .xlsx .json .txt and .dat files. I followed the instructions from the lesson 2 in essentials:
"Follow the steps for the software you are using to assign a library named PG1 that reads the SAS tables for this course.
SAS Studio
SAS Enterprise Guide
libname pg1 "&path";
In order to see SAS datasets in a library, you have to populate the library. Importing external data into SAS is part of the Programming 1 course.
Hi:
Our e-learning course has instructions, inside the course for how to make the data. Here's what the screen looks like:
I'm confused by the instructions you pasted because they don't look like the instructions we have for SAS University Edition or for Enterprise Guide. As you can see, we have a separate set of instructions for both SAS University Edition and SAS Enterprise Guide AND all the other interface methods that a student might use.
Can you explain how you're using SAS? Did you run the data creation program? Did someone revise the instructions for Programming 1? Are you taking a version of Programming 1 from a professor?
Your use of "myfolders" indicates that you might be using SAS University Edition in a Virtual Machine. If so, your top node in SAS Studio when you go to Server Files and Folders should be My Folders. That means the physical path name for your class data would be:
/folders/myfolders/EPG1V2/data and that means your LIBNAME statement would be:
libname PG1 '/folders/myfolders/EPG1V2/data';
You can ALWAYS verify this location by following the instructions and going to the Server Files and Folders pane, expand the EPG1V2 folder under the top node and then right click on the data subfolder and choose Properties. If you followed the instructions inside our class correctly, then the Location field should show you the correct full path you need for a LIBNAME statement.
The zip file we provide does come with some files already created. But most of the files that you need for the course are created by the data setup program. So you need to run that program to successfully make all the data.
Remember that the SAS LIBNAME statement is meant to point to SAS proprietary files with the file extension of .sas7bdat -- so after you issue your LIBNAME statement, your PG1 library will show you ONLY the SAS files in the library. On the other hand, the Server Files and Folders pane should show you ALL the files in the class EPG1V2/data folder. For example, if you need to read one of the XLSX files, such as the np_info.xlsx file or the storm.xlsx file -- then you should find the XLSX and other files in the data subfolder AFTER you run the data creation program. Assuming that the path to your data folder is:
/folders/myfolders/EPG1V2/data then the path for PROC IMPORT would be:
datafile='/folders/myfolders/EPG1V2/data/np_info.xlsx' or
datafile='/folders/myfolders/EPG1V2/data/storm.xlsx'
Hope this helps,
Cynthia
This video shows how to make the data for the Programming 1 class using SAS University Edition in a Virtual Machine: https://www.youtube.com/watch?v=5vfd_jt8ttc
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.