I am a SAS beginner and self learninig with SAS Programming 1: Essentials training with SAS Studio on line.
I am blocked when I restart SAS Studio, for exemple in lesson 3 : Exploring and Validating Data
My question is that I don't understand how to excute libname.sas to recreate the PG1 library once I restart SAS studio ?
Here is the remander:
Reminder: If you restarted your SAS session,you must recreate the PG1 library so you can access your practice files. In SAS Studio, open and submit the libname.sas program in the EPG194 folder.
Righe click the folder EPG04, then I open a new program (or F4) and execute libname.sas in code, and run, but it doesn't work...
Thanks for your help
LIBNAME.SAS was a program with code you wrote in Lesson 2: Accessing Data Through Libraries. The program should have a LIBNAME statement as written below:
libname pg1 "FILEPATH";
Just replace the text FILEPATH with the location of the EPG194/data folder. It might be called something different on your SAS Studio. If you right click the data folder and click Properties (picture below), then you can see the Location and copy it into your LIBNAME statement.
I am guessing you did that activity but did not save the program as LIBNAME.SAS, so nothing's wrong at all! Let me know if this works.
Out of curiosity, are you using SAS University Edition or SAS On Demand for Academics? Or a local version of SAS?
You need to find the location of the data folder, confirm that there are tables in that location, then copy the file location. You will use that in a LIBNAME statement to tell SAS where to look for all the data.
For example. My data is in my S:\workshop\data folder. In that location I have 25 SAS tables. I need to tell SAS where the tables are.
LIBNAME pg1 "S:\workshop\data";
If there are not tables in that location you will need to create the data for the course. You can do that by checking out these videos: https://communities.sas.com/t5/Programming-1-and-2/bd-p/course_discussions
Let me know if that works.
I have a related question. I am using SAS studio. I logged out and when I began a new session, I recreated the library using my saved libname program. When I run the program, it does create the PG 1 library. However the PG1 library folder is empty - no tables. I am directing the libname statement to my EPG 194 folder within SAS studio where I do see many tables. Why is the library empty? Here is my syntax:
LIBNAME pg1 "/home/u44988922/EPG194";
Looks like you are using SAS On Demand for Academics?
Physically go to the folder you pointed to with your LIBNAME statement. You should see that there are folders in that location but no actual SAS data sets. You need to go into the data subfolder.
Go into that data folder through the Server Files and Folders pane. You should see data in it. If you do, you set it up correctly and need to tell SAS 'Go to that data folder, I have data there I want to use'. You can right click on the data folder, select properties and see the location.
To tell SAS you want to use the data in that location make sure to use the LIBNAME statement to point to it. You need to most likely add data to the end of your path:
libname pg1 '/home/u44988922/EPG194/data';
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.