BookmarkSubscribeRSS Feed
BigZ
Calcite | Level 5
Hi there.
I am atmpting to create single Lib from 2 different libs in my autoexec file
Here is what I have:

libname lib1 odbc
DATASRC=server
USER=userID
PASSWORD="&dbpass"
readbuff=1000
schema='dbo'
;

libname lib2 odbc
DATASRC=server
USER=userID
PASSWORD="&dbpass"
readbuff=1000
schema='Floro'
;
libname lib3 (lib1 lib2);

So what I whant to do is to only have lib3 in my explorer window. Right now I am geting all 3 libs displayed. But I want only lib3 to be desplayed.

Thanks
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Forum etiquette suggestion: Duplicate posts in more than one forum is not necessary.

Regarding your question, my attempt at this task required a manual delete from the SAS Explorer Window.

Scott Barry
SBBWorks, Inc.
RichardH_sas
SAS Employee
Hmm, EG is really designed to show you everything. You could try assigning lib1 and lib2 in the config file instead (syntax is a bit different from an autoexec). By default, they won't show up on the server list until the data is accessed... but I think that would happen as soon as you start using files from the concatenated library.

Perhaps someone else will have a good suggestion!
BigZ
Calcite | Level 5
FYI
I was able to solve my own problem. Here is my solution to the problem. I am posting it so that others can use it if they need it.

libname lib1 odbc
DATASRC=server
USER=userID
PASSWORD="&dbpass"
readbuff=1000
schema='dbo'
;

libname lib2 odbc
DATASRC=server
USER=userID
PASSWORD="&dbpass"
readbuff=1000
schema='Floro'
;
libname lib3 (lib1 lib2);

libname lib1 clear;
libname lib2 clear;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1254 views
  • 0 likes
  • 3 in conversation