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

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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