BookmarkSubscribeRSS Feed
CYC85249
Calcite | Level 5

How do you read a sas7bdat file into SAS studio?

 

I am a new user for SAS studio.

I upload a sas7bdat under user ->my folder. the loacation of the file is under "/Users/xxx/My Folder"

Did I import the file to the wrong location so I can not read it?

 

 

2 REPLIES 2
SASKiwi
PROC Star

A SAS7BDAT file is a SAS dataset. Allocating a LIBNAME statement to "/Users/xxx/My Folder" should be all you need to do to read the dataset. Run this to see if you can successfully read it:

libname MyLibref "/Users/xxx/My Folder";
proc datasets library = MyLibref;
  contents data = mysasfile;
run;
quit;

NB: If your  SAS session runs on Unix/Linux folder names are case sensitive so case must match.

Tom
Super User Tom
Super User

And SAS will only look for files using all lowercase letters.  So if your dataset is named MyData then the file needs to be named mydata.sas7bdat.