BookmarkSubscribeRSS Feed
lmills3
Calcite | Level 5
Below is the message I received when trying to do an activity, in Lesson 2: Accessing Data:
 
proc contents data="FILEPATH/storm_summary.sas7bdat";
ERROR: Path "FILEPATH" does not exist.
72
run;
 
Why? What did I not do right?
4 REPLIES 4
ballardw
Super User

@lmills3 wrote:
Below is the message I received when trying to do an activity, in Lesson 2: Accessing Data:
 
proc contents data="FILEPATH/storm_summary.sas7bdat";
ERROR: Path "FILEPATH" does not exist.
72
run;
 
Why? What did I not do right?

FILEPATH is a place holder in code where you should replace the text 'FILEPATH' with an actual location on your computer such as

"c:\thisfolder\datafolder\storm_summary.sas7bdat". You value should include the actual path to where that data file is located.

 

Since different computer operating systems use different ways to indicate paths and the start of path (windows uses a drive letter to start, Unix a drive mount name) the example code uses a generic term.

This is also one reason  that SAS uses library references so that most of that path stuff can be set in one piece of code not needed again.

Tom
Super User Tom
Super User

Looks like you didn't replace the example text FILEPATH with the actual path of the directory where your file is stored. Something like one of these.

proc contents data="/home/myuserid/mysasfile/storm_summary.sas7bdat";
proc contents data="c:\users\myuserid\mysasfile\storm_summary.sas7bdat";

Another possibility is that they wanted you to make a macro variable named  FILEPATH that has the path of the directory and you should be using &FILEPATH in your PROC CONTENTS code.

%let filepath=/home/myuserid/mysasfile;
proc contents data="&filepath./storm_summary.sas7bdat";

For more precise help explain what lesson you are running and SAS interface you are using.  SAS Display Manager? SAS Enterprise Guide? SAS/Studio.

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

using your mouse point at the table storm_summary and see what the path to the file is.

Then replace the filepath with the real path name to the data table.

its going to start with a \ or a // or maybe a C:\ but only you can tell for sure.

lmills3
Calcite | Level 5

I wish that answered it, yet I am uncertain what I have done wrong in the "setup" ....maybe..? 

I copied and pasted my location of the filepath and I still have the 'error' message

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
  • 4 replies
  • 1042 views
  • 1 like
  • 4 in conversation