Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable a library at startup SAS?

Tags:

sas

Whenever I create a new library, then close SAS and open it again, I could not find my library. I found an option: Tools => New Library => check "Enable at startup"

What is the coding for this feature?

libname mylib "C:// ......  " *then what?
like image 962
Бывший Мусор Avatar asked Mar 23 '23 21:03

Бывший Мусор


2 Answers

Put all of your libnames that you want available in every session inside an autoexec.sas file.

like image 91
Eddie Rowe Avatar answered Mar 25 '23 11:03

Eddie Rowe


Here are two ways to do this: If you are using a metadata server, define the library there and check the option "Library is preassigned" under properties>Options>Advanced options. Now the library should appear in the clients that uses the workspace server that the library is assigned to, provided that your metadata identity has read permissions.

If you are using a standalone SAS Foundation client and does not use a metadata server, you should put the libname statement in an autoexec.sas file. This will be executed when you start SAS if it is in either the folder where you run sas from (the current folder) or in one of the folder specified by the PATH environment variable or in the root of the current folder or the same folder as sas.exe.

You can also specify the autoexec option when you start sas, like this: sas.exe -autoexec "/path/to/the/autoexec.sas" Or, you can specify the autoexec option in the config file. This is called sasv9.cfg and resides in the same folder as the sas.exe file.

like image 31
Stig Eide Avatar answered Mar 25 '23 12:03

Stig Eide