BookmarkSubscribeRSS Feed
ColmSmyth
Fluorite | Level 6
Hi all,

Is there a max number of connection libnames in SAS 9.2, I have code that outputs reports to many seperate XLS connections using libname.

Some info on google about it regarding limit of 65 connections but nothing official from SAS.

The error I get is:
ERROR: Connect: Unspecified error

If will not go away unless i clear a a libname to free up the connection space.

Thanks

Colm
4 REPLIES 4
ChrisHemedinger
Community Manager
Colm,

I've confirmed that's the limit (64 connections):
[pre]
%macro excelMany(howMany);
%do i = 1 %to &howMany;
libname test&i. excel path="c:\sas\data\test.xls";
%end;
%mend;

%excelMany(65);
[/pre]
This generates an error on the 65th assignment. The workaround is to clear the other libnames before you assign another one.

The MS Jet API (used for this type of connection) does have a limitation of 128 sessions, I've read. It might be that each libref connection uses 2 of those sessions in SAS, but that's a guess on my part.

Chris
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Peter_C
Rhodochrosite | Level 12
and it is not an issue for base SAS library engine. I've tested 70 OK
ColmSmyth
Fluorite | Level 6
It strange then as im running Base now and i get the error on 64...ohh well perhaps some installations are different ?

At any rate I have work around now so its ok.

Cheers
ColmSmyth
Fluorite | Level 6
Thanks Chris...I have just moved my clear statements to after each out file so it clears as it goes.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1200 views
  • 0 likes
  • 3 in conversation