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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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