SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Error in SAS import..connection failed & error in libname statement

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 124
Accepted Solution

Error in SAS import..connection failed & error in libname statement


Hi All,

I was using the point and click import feature in SAS to import an excel file and it gives me a message and says' connection failed' and 'error in libname' statement. I researched a bit and the information was for older versions of SAS. I use SAS 9.4. Also, the file I was trying to import is placed on a flash drive. Please let me know you suggestions.

Thanks.


Accepted Solutions
Solution
‎03-31-2015 02:23 AM
Super User
Posts: 7,854

Re: Error in SAS import..connection failed & error in libname statement

The ERROR does not refer to the libname a "E:\test"; statement. There mus be another libname before that that causes the error.

This may be helpful for you:

43933 - "Connection Failed" and "Connect: Class not registered" errors occur when using the Import W...

37412 - Errors occur when you import Microsoft Excel or Microsoft Access files into SAS® 9.2

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Frequent Contributor
Posts: 124

Re: Error in SAS import..connection failed & error in libname statement

Basically, this is the message I am getting when I import an excel file

ERROR: Connect: Class not registered

ERROR: Error in the LIBNAME statement

Super User
Posts: 5,437

Re: Error in SAS import..connection failed & error in libname statement

Are you in SAS Foundation in Windows? And do you use the Import Wizard?

What is the version and type (file extension) of the Excel file?

Full code and log would help.

Data never sleeps
Super User
Posts: 7,854

Re: Error in SAS import..connection failed & error in libname statement

Looks like you try to use an access method for which you do not have the license and/or which is not installed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 11,343

Re: Error in SAS import..connection failed & error in libname statement

What was the libname statement?

PROC Star
Posts: 1,167

Re: Error in SAS import..connection failed & error in libname statement

I remember something similar. EG imports the dataset, and moves it via FTP to a temp location on the server, from which SAS on the server copied it to my final library. There was a problem with access to the temp location, so the export failed, but the problem was difficult to trace and required some SAS expertise.

Tom

Frequent Contributor
Posts: 124

Re: Error in SAS import..connection failed & error in libname statement

Thanks all for your input. I did use the import wizard. My excel file was on a flash drive.

For example the libname statement was:

libname a "E:\test";

The minute I start using the import wizard I get the message..connection failed and check log. My log looks like this...

ERROR: Connect: Class not registered

ERROR: Error in the LIBNAME statement.

NOTE: Attachments for -3 reestablished for new parent.

NOTE: Import Cancelled.

1    libname a "E:\test";

NOTE: Libref A was successfully assigned as follows:

      Engine:        V9

      Physical Name: E:\test

Solution
‎03-31-2015 02:23 AM
Super User
Posts: 7,854

Re: Error in SAS import..connection failed & error in libname statement

The ERROR does not refer to the libname a "E:\test"; statement. There mus be another libname before that that causes the error.

This may be helpful for you:

43933 - "Connection Failed" and "Connect: Class not registered" errors occur when using the Import W...

37412 - Errors occur when you import Microsoft Excel or Microsoft Access files into SAS® 9.2

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 124

Re: Error in SAS import..connection failed & error in libname statement

Posted in reply to KurtBremser

Hi @KurtBremser..I don't have another libname before that caused the error. But, I do have 32 bit MS office and 64 bit SAS...so that might be the issue. Your links are helpful and second one  might address the bit size issue. I just need the server name for that. Will keep you all posted. Thanks.

Frequent Contributor
Posts: 124

Re: Error in SAS import..connection failed & error in libname statement

Posted in reply to KurtBremser

Hi @KurtBremser and all,

The problem with SAS import wizard was resolved. Turns out the SAS PC files server was 64 bit which did not match with my 32 bit Windows Office. So the PC files server was stopped, uninstalled and the SAS PC files server 32 bit was installed. Steps on this link were followed

SAS Downloads: SAS PC Files Server.

I still got an error after that...which is

ERROR: CLI error trying to establish connection: [Microsoft][ODBC Excel Driver] General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x490 Thread 0xbbc DBC 0x3bb7fdc Excel'. ERROR: Error in the LIBNAME statement

This error corresponded to a error number (40228) in SAS support which meant the Windows drivers were old and needed to be replaced. The following link helped correct the problem 40228 - "Volatile ACE DSN" errors occur when you import Microsot Excel files using the EXCELCS engin...

SAS provided technical support to resolve this issue. Here is the documentation for 9.4 PC files server http://support.sas.com/documentation/cdl/en/pcfsicg/67728/PDF/default/pcfsicg.pdf

Thanks !

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 9117 views
  • 0 likes
  • 5 in conversation