I currently use SAS 9.1.
I have a library that is attached to an external folder. I want to change this external location permanently, so that the library will already be connected to that folder when SAS opens, without using any code.
Does anyone know how to change a library's settings permanently?
Thanks.
A library definition is a reference to a network location. So if you had:
a:\alocation\subdirectory
You would create libname reference to this e.g.:
libname mylib "a:\alocation\subdirectory";
If I move the files in that directory somewhere else I close the libname and re-assign:
libname mylib clear;
libname mylib "a:\somewhereelse";
So somewhere in you programs, or startup files (autoexec.sas ?) there will be definitions to setup libnames. It is there that you would need to assign them to point at a new area.
Ok I will try that. Thank you for your help!
One way in Base SAS is to go to the tools menu and select New Library which will let you set the name, location, various options and a check box to "enable at startup" which will make the library available at each start of a SAS session.
But I generally use code referenced in Autoexec.sas for my permanent libraries as I have had issues with registry type items not surviving updates and or OS changes.
Is there a way to change the settings of a library that's already created without creating a whole new library?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.