BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
olaelsakhawy
Fluorite | Level 6

Hi all, 
I am a new SAS user and working now on essential training. 
Screen Shot 2021-01-01 at 1.44.00 AM.png

Using SAS on demand on MacBook Air. 
I am trying to create library by using this statement  <libname pg1 ':/home/user id /sasuser.v94/p104d04.sas';>
the library pg1 created but empty from data that I already upload it on cloud folder. 
I read previous answers about this problem but failed. I followed the instructions for file path. Screen Shot 2021-01-01 at 1.39.16 AM.png

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Please go back to the Course Overview and Data Setup section of the course. We have specific instructions for how to make the data when using the SAS OnDemand server. First, to debug your issue, go to the Server Files and Folders pane (NOT the Libraries pane). Then directly under the Files (Home) top node, do you see an EPG1V2 folder? If you do NOT have an EPG1V2 folder under Files (Home), then you did NOT follow the setup instructions correctly.

 

  So that's the very first thing you need to do. It doesn't matter whether you are on a Mac or a Windows machine. Using SAS OnDemand is the same -- accessed from a browser -- no matter which system you're on. Here's a video that shows exactly how to make the data when you're using SAS OnDemand for Academics:

https://youtu.be/piTtnbzODPs

 

  Until you follow the directions in the Course Overview section, which are demo'd in the video, your PG1 library will not be created correctly. Assuming you have set things up correctly, then EVERY OnDemand student will have the SAME LIBNAME statement:

libname PG1 '/home/<userID>/EPG1V2/data';

where <userID> is your userID for the OnDemand account. Here are some examples;

libname PG1 '/home/jdoe0/EPG1V2/data';

libname PG1 '/home/u123456/EPG1V2/data';

libname PG1 '/home/fransmith0/EPG1V2/data';

 

  For our setup instructions to work, you must have an EPG1V2 folder directly under the main Files (Home) top node and you must run the setup/creation program which makes all the subfolders and all the SAS data in the data subfolder that you will need for class. But the LIBNAME statement will NOT work unless you do the setup first.

  Hope this helps,

Cynthia

View solution in original post

12 REPLIES 12
Shmuel
Garnet | Level 18

It seems that PG1 is a file in ODUT folder and not a library.

The libname should be:

libname ODTUT "<path to the folder>";

then, suppose PG1 is a sas dataset you refer to it as ODOUT.PG1 in a SET statement of a data step

or DATA= statement of a procedure.

Shmuel
Garnet | Level 18
If you right click on ODUT folder you will get its path.
Cynthia_sas
SAS Super FREQ

Hi:

  Please go back to the Course Overview and Data Setup section of the course. We have specific instructions for how to make the data when using the SAS OnDemand server. First, to debug your issue, go to the Server Files and Folders pane (NOT the Libraries pane). Then directly under the Files (Home) top node, do you see an EPG1V2 folder? If you do NOT have an EPG1V2 folder under Files (Home), then you did NOT follow the setup instructions correctly.

 

  So that's the very first thing you need to do. It doesn't matter whether you are on a Mac or a Windows machine. Using SAS OnDemand is the same -- accessed from a browser -- no matter which system you're on. Here's a video that shows exactly how to make the data when you're using SAS OnDemand for Academics:

https://youtu.be/piTtnbzODPs

 

  Until you follow the directions in the Course Overview section, which are demo'd in the video, your PG1 library will not be created correctly. Assuming you have set things up correctly, then EVERY OnDemand student will have the SAME LIBNAME statement:

libname PG1 '/home/<userID>/EPG1V2/data';

where <userID> is your userID for the OnDemand account. Here are some examples;

libname PG1 '/home/jdoe0/EPG1V2/data';

libname PG1 '/home/u123456/EPG1V2/data';

libname PG1 '/home/fransmith0/EPG1V2/data';

 

  For our setup instructions to work, you must have an EPG1V2 folder directly under the main Files (Home) top node and you must run the setup/creation program which makes all the subfolders and all the SAS data in the data subfolder that you will need for class. But the LIBNAME statement will NOT work unless you do the setup first.

  Hope this helps,

Cynthia

olaelsakhawy
Fluorite | Level 6

Thank you Cynthia.
This work with me. 
Screen Shot 2021-01-01 at 11.40.58 AM.png

Thuong
Fluorite | Level 6

Hi Cynthia,

Could you please help me clarify why we need to use user ID to create Pg1 instead of the filepath as the lesson instruction?

 

Thank you.

Kurt_Bremser
Super User

There are different instructions for different SAS setups

  • locally on a Windows PC, with Display Manager or Enterprise Guide as frontend
  • client/server with Enterprise Guide
  • client/server with SAS Studio

SAS On Demand is the latter, and files must reside in a subdirectory of your HOME directory on the Linux server, so you cannot use your local paths.

Thuong
Fluorite | Level 6
Thanks Kurt
Cynthia_sas
SAS Super FREQ
Hi:
You only need to use the userID on the SAS OnDemand for Academics server because your userID is part of the physical location of the file on the server. On SAS OnDemand for Academics, if you right click on the Files (Home) top node and choose Properties, you will see a Properties window with a location like this:
/home/u12345678 (where u12345678 is your unique user id)

Then, if you have a folder called WOMBAT under the Files (Home) top node, and you right click on the WOMBAT folder and choose Properties, then the location would be:
/home/u12345678/WOMBAT

and then, if you have an EPG1V2 folder under the Files(Home) location, the physical path would be:
/home/u12345678/EPG1V2

and so, if you have a data subfolder under the EPG1V2 folder that's under Files (Home) and you click to find the Properties of the data subfolder, that physical path location would be:
/home/u12345678/EPG1V2/data

On the other hand, on my personal Windows machine, with a local copy of SAS, I have a SAS_Class folder with the EPG1V2 folder under that location, and the data subfolder is under

So, as you see, your userID on the SAS OnDemand for Academics server includes your unique userID as part of the physical path on the server.

Cynthia

Tom
Super User Tom
Super User

You are over complicating things.  Every Unix machine I have used in the last 10-20 years has allowed the use of ~ to indicate your home directory.  So no need for these SAS novices to know what their home directory is called in SAS ODA.

 

 69         libname me '~/';
 NOTE: Libref ME was successfully assigned as follows: 
       Engine:        V9 
       Physical Name: /home/tom.XXXX

So just use:

libname PG1 '~/EPG1V2/data';

 

Cynthia_sas
SAS Super FREQ

Thanks @Tom, you are correct. And, in the setup instructions for Programming 1, we have THIS information. (green highlights are mine)
Cynthia

 

Cynthia_sas_0-1659563177321.png

 

Thuong
Fluorite | Level 6

Much appreciate your clarification 🙂

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

Register now!

5 Steps to Your First Analytics Project Using SAS

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.

Discussion stats
  • 12 replies
  • 2517 views
  • 5 likes
  • 6 in conversation