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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 2 replies
  • 747 views
  • 2 likes
  • 3 in conversation