Hi All,
If I have a SQL database, and I need to run the below code to have the library "test" show up under SAS Enterprise Guide libraries.
Libname test odbc user=*** password=*** datasrc=***;
Is there a way I can do in Enterprise Guide to save running that code every time? I mean once I open the EG, the library is already under the SAS Enterprise Guide libraries, without runing the code I provided above.
Thank you!
Jade
There are a couple of ways potentially. I have several libraries setup in my SAS Autoexec file on my SAS Server. That way whenever I start Enterprise Guide (Miner too I think) or a batch job on the server, those standard libraries are always there, along with other things I use regularly, like various macro variables and system options. Enterprise Guide itself has a similar functionality internally too, it's in the options under "SAS Programs" where you can specify custom code to run on EG startup or or other times.
There are a couple of ways potentially. I have several libraries setup in my SAS Autoexec file on my SAS Server. That way whenever I start Enterprise Guide (Miner too I think) or a batch job on the server, those standard libraries are always there, along with other things I use regularly, like various macro variables and system options. Enterprise Guide itself has a similar functionality internally too, it's in the options under "SAS Programs" where you can specify custom code to run on EG startup or or other times.
Best practice would be to set up these libraries in SAS Management Console. This link should help:
Thanks! Both of your reply are solutions to my question!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.