Help using Base SAS procedures

Editing a library's properties permanently

Reply
Occasional Contributor
Posts: 6

Editing a library's properties permanently

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.

Super User
Super User
Posts: 7,392

Re: Editing a library's properties permanently

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.

Occasional Contributor
Posts: 6

Re: Editing a library's properties permanently

Ok I will try that. Thank you for your help!

Super User
Posts: 10,460

Re: Editing a library's properties permanently

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.

Occasional Contributor
Posts: 6

Re: Editing a library's properties permanently

Is there a way to change the settings of a library that's already created without creating a whole new library?

Ask a Question
Discussion stats
  • 4 replies
  • 181 views
  • 0 likes
  • 3 in conversation