BookmarkSubscribeRSS Feed
RioNAz
Calcite | Level 5

Re: Programming1 Lesson 2: Accessing Data proc contents data="&filepath/storm_summary.sas7bdat"; run; found the fix from 2018 but it didnt work, is there a new statement that works.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:
I think the syntax model in the assignment shows data="FILEPATH/storm_summary.sas7bdat" and, you need to go find your data folder under the Server Files and Folders pane (if you're using SAS Studio). and then right click on the data folder and choose Properties to find the correct full path to use. Typically, you either replace the word FILEPATH with the full path location or if you are using SAS Enterprise Guide you use the special macro variable &PATH that is created for you by the setup program.

In order to figure out the correct path, you first need to identify for us HOW you are using SAS -- SAS OnDemand for Academics, SAS University Edition, SAS Enterprise Guide, SAS on Windows. Then the method of identifying your data location should be easy from there.

As I remember the Programming 1 course for the newest version of the class, you should have an EPG1V2 folder and the instructions show the word FILEPATH as a place holder, as shown below:

Cynthia_sas_0-1599440706824.png

 



When you created the class data, you should have created a folder called EPG1V2 in SAS Studio. But that is only part of the path name. You need to use the FULL operating system path name if you are going to use the operating system method of referencing the file.
If code shows data="FILEPATH/storm_summary.sas7bdat" then you might have something like this:
** SAS University Edition;
proc contents data="/folders/myfolders/EPG1V2/data/storm_summary.sas7bdat";
run;

** SAS OnDemand for Academics;
proc contents data="/home/<userID>/EPG1V2/data/storm_summary.sas7bdat";
run;

** SAS on Windows with a local install;
proc contents data="c:\sas_class\EPG1V2\data\storm_summary.sas7bdat";
run;

** Enterprise Guide -- &PATH is created automatically by the autoexec process flow;
proc contents data="&path/storm_summary.sas7bdat";
run;

The 2018 answer probably referred to a folder named EPG194, which was the folder for the previous version of Programming 1. The newer version uses a class folder named EPG1V2, as shown in the screen shot above.

 

Later in this lesson, we will show you an alternate way to point to SAS files using a LIBNAME statement to point to the high level folder path. But in order to make the LIBNAME statement work, you still need to be able to find the correct path to your data folder.

Hope this helps,
Cynthia

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 598 views
  • 0 likes
  • 2 in conversation