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
Amethyst | Level 16

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
Amethyst | Level 16

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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