02-08-2017 05:25 AM
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!
02-08-2017 06:12 AM
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;
02-08-2017 06:41 AM
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"
02-08-2017 06:44 AM
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.