03-11-2013 09:12 AM
Hello every one.
Generally i use LIbaname Statement to create New LIb in SAS environment. But if i close SAS session and open again,the lib was getting disappearing.So i have to run that Lib name Statement Again
But in other Case
,If i create New Lib in GUI based,i can able to see that lib even in the next SAS session.
My question is "Is there Any way to Create Lib permanently with LIBNAME statement ????"
03-11-2013 09:26 AM
If you place the libname in the SAS autoexec.sas file it will be created everything SAS starts, which I think is what you want. If you never have used autoexec then you might have to create one. Where it lives depends on the SAS install location but typically on windows the files would be in something like C:\program files\SAS\SASFoundation\9.2
On server installs we have had to place a %include in the autoexec with the path to the users network space and their customized autoexec.
Hope this helps
03-11-2013 09:27 AM
If you want SAS to recognise a permanent library every time you login you need to change the options invoked by SAS at load. One way to do this is to change the SAS startup script to always, automatically, include a libname statement.
This may not be a good idea if you are working in a shared environment and your code has to be run by other users at some point. It can create errors which are hard to fix if the location of the library to be shared is undocumented.
What's the big deal with having a libname statement at the head of the code? It acts as documentation and does not slow you down any compared with having the libname in your startup script.
03-11-2013 05:34 PM
This page discusses how to create and where to place an autoexec.sas
which has a libname statement.
An autoexec.sas file is automagically %included at startup.
Ron Fehd autoexec maven