BookmarkSubscribeRSS Feed
Vanessa2
Calcite | Level 5
Hi,
I am new to sas studio. I was learning how to create libname and I was doing an
e-learning course. However, I am stuck with these codes which I obtained from the
course. At first, I use properties in Data and paste it in the filepath.
When I run the libname, it says STAT1 does not exist. I tried to create a libname
and still it does not work. I am stuck and I cannot carry on with the course.
Can you help please?

%let homefolder=FILEPATH/myshortcuts/Myfolders/ECST142/data/STAT1;

libname STAT1 "&homefolder";

Vanessa
8 REPLIES 8
Cynthia_sas
SAS Super FREQ

Hi:

  In the STAT1 course, you need to replace FILEPATH with YOUR path to the folder that you unzipped.

 

  If you are using SAS University Edition in a virtual machine, typically you do NOT put the files in a "shortcuts" folder. We tell you to write the folder directly under your My Folders top node. In this case, the path would be something like:

%let homefolder=/folders/myfolders/ECST142/data;

libname STAT1 "&homefolder";

or else it would be something like this:

%let homefolder=/folders/myfolders/ECST142/data;

libname STAT1 "/folders/myfolders/ECST142/data";

 

(note that STAT1 programs usually expect to find the helper variable &homefolder defined as the path to the data folder)

 

Note how the top folder path is /folders/myfolders. The fastest way to find the correct full path to use is to go to SAS Studio and find your ECST142/data folder. Right click on the folder name and choose Properties. When you do that, the Location field in the Properties window will show you the EXACT path that you need to use.

 

Hope this helps,

cynthia

Vanessa2
Calcite | Level 5
I was trying to use proc import and use the codes:
proc import datafile="filepath/data/eu_sport_trade.xlsx"
DBMS=xlsx
out = eu_sport_trade
replace;
run;
but I have a message saying:
physical file does not exist
how can access this dataset
Vanessa
Tom
Super User Tom
Super User

Your need to replace the literal text FILEPATH with the actual path. It needs to be the path on the machine (virtual or real) where SAS is running.

 

Re-read @Cynthia_sas 's post more carefully.  She has explained everything you need to know to fix your problem.

 

 

Vanessa2
Calcite | Level 5

Hi Cynthia,

I have really hard to create the libname to obtain all the datasets for the folder 

EPG194. For this folder, there is no way, I could find the datasets. When I was working on the statistics module, I had these codes to create the SAS datasets. I could see the createdata.sas. The codes to create the macros are:

/* create macro variables to hold the names of the interval and */
/* categorical variables used in the demo and practice programs */

%let interval=Gr_Liv_Area Basement_Area Garage_Area Deck_Porch_Area
Lot_Area Age_Sold Bedroom_AbvGr Total_Bathroom;

%let categorical=House_Style2 Overall_Qual2 Overall_Cond2 Fireplaces
Season_Sold Garage_Type_2 Foundation_2 Heating_QC
Masonry_Veneer Lot_Shape_2 Central_Air;

 Vanessa

Cynthia_sas
SAS Super FREQ
Hi:
The instructions for making the data in Programming 1 are slightly different than the instructions for Statistics 1. But we do have instructions for ALL the methods of using SAS.
How are you using SAS? Do you start up VirtualBox or VMWare Player first? Do you start up the OnDemand Control Center? From your previous posts, it seemed like you might be using SAS University Edition in a Virtual Machine using either VirtualBox or VMWare player. If that is the case, then you should have unzipped the zip file from Programming 1's instructions into your shared folder location. Please go back to Programming 1, to the Course Overview and Data Setup section of the course and revisit the setup instructions for SAS University Edition in a Virtual Machine. There's a zip file there that needs to be downloaded to your machine. Then the zip file needs to be unzipped and the contents put into your shared folder location in folder called EPG194. The data subfolder will be under the EPG194 main folder. The setup.sas file and the createdata.sas files ARE inside the zip archive for SAS University Edition.

Here's a video that you can watch https://youtu.be/OZniWlafFEk that shows exactly how the setup works in Programming 1 when you are using SAS University Edition in a Virtual Machine.
Hope this helps,
Cynthia
Vanessa2
Calcite | Level 5
Hi Cynthia,

Still having difficulties.

I cannot see the zip file from the programming 1's instructions in my
shared folder.
I don't know how to get back to the course overview and data set up section
of the course. The only thing I could get through are the explanation about
writing SAS codes in the connected e-learning programming 1. I could also
get access to the SAS studio.
Vanessa
Cynthia_sas
SAS Super FREQ

Hi:
Please go to your My Training page (https://support.sas.com/edu/viewmyelearn.html ) and sign on to your SAS Profile, if prompted. Then click on Programming 1 in the list of e-learning classes.

Once you are inside Programming 1, you should see a Table of Contents with the Course Overview and Data Setup lesson at the very top, as shown below:

Cynthia_sas_0-1587392507817.png


When you click on the lesson highlighted above, you will next see this:

Cynthia_sas_1-1587392573316.png

Watch and listen to the material in this lesson and then click on the last topic in the list and you will see THIS:

Cynthia_sas_2-1587392677282.png

When you click on the link for your method of using SAS, you should see this

Cynthia_sas_3-1587393011435.png

 

click on the words "this zip file" in order to start the download of the zip file. Here's what the zip file looks like for SAS University Edition:

Cynthia_sas_4-1587393179232.png

There is a main/top folder called EPG194 and several sub-folders under that main folder. ALL of the zip file should be unzipped to your shared folder location (under SASUniversityEdition/myfolders on your system) if you are using SAS University Edition in a Virtual Machine.


After you do the setup, then you can proceed with the rest of the work in the class.
Cynthia

Cynthia_sas
SAS Super FREQ

Hi:

  Your first question was about STAT1. Your second question seems to be about Programming 1. ANYTIME you see the string FILEPATH in code, we expect you to replace that string with YOUR location for the class data folder, You showed THIS code:

proc import datafile="filepath/data/eu_sport_trade.xlsx"
DBMS=xlsx
out = eu_sport_trade
replace;
run;

 

If you are using SAS University Edition in a Virtual Machine and IF you did the data setup for the class correctly, we would expect you to replace "filepath" in the above code with this (first line only displayed):

proc import datafile="/folders/myfolders/EPG194/data/eu_sport_trade.xlsx"

 

Or, if you are using SAS OnDemand for Academics on our cloud server and IF you did the data setup for the class correctly, we would expect you to replace "filepath" in the above code with this (first line only displayed):

proc import datafile="/home/<yourUserID>/EPG194/data/eu_sport_trade.xlsx"

 

One way to see the correct full path to use for the eu_sport_trade.xlsx file is to go to your Server Files and Folders pane in SAS Studio. Find your EPG194 folder and click the little triangle/arrow to expand the contents. Find your data subfolder and click to expand the data subfolder. In the folder you should see the eu_sport_trade.xlsx file -- just right-click on the file and choose Properties. In the popup window, you'll see a Location field. The full path you need is shown in this box. All you need to do is highlight the FULL path and do a CTRL+C to get the path and then do a CTRL+V between the quotation marks.

 

Hope this helps,

Cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 8 replies
  • 1151 views
  • 0 likes
  • 3 in conversation