BookmarkSubscribeRSS Feed
byeh2017
Quartz | Level 8

Hello Everyone,

 

New to SAS. After importing my excel file to SAS, how do I save the file permanently into a sas dataset? Everytime I save the project and close out, I have to reimport the dataset again. Thanks for your help!

 

Bryan

3 REPLIES 3
JuanS_OCS
Azurite | Level 17

Hello @byeh2017,

 

if you have your excel file in SAS in a sas dataset, you can use a library and a data step to save it from the work location to the library (permanent location).

 

Something as the following code should work:

 

libname myfolder BASE "C:\my_folder";

data myfolder.myexcel;
set work.myexcel;
run;
byeh2017
Quartz | Level 8

Is the base where the library folder name should be? How do I know the location of my library folder? At this point my temporary dataset from excel on SAS is called "work.'inpatient data basefile'n"

 

Thank you

JuanS_OCS
Azurite | Level 17

Hello @byeh2017,

 

you can select the location you prefer as permanent location. I am sure you have your home/user folder where you store all your code and other archives.

 

Also, a recommendation: I highly recommend you to change the final name of your sas datasets from "work.'inpatient data basefile'n" to something more simple and readable as: "myfolder.InpatientData" or similar.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1406 views
  • 0 likes
  • 2 in conversation