BookmarkSubscribeRSS Feed
Rerickson123
Calcite | Level 5

My coworker is using SAS Enterprise 6.1.  I am using 8.3.

 

I am unable to use this program code to connect to the database - my coworker is able to us it. 

 

Is there something different between the 2 versions language here?

 

 

libname conf odbc dsn=mainframe

user=&uname

password=&passwd 

schema=conformed

read_lock_type=nolock;

 

Heres the error.

WARNING: Apparent symbolic reference UNAME not resolved.
WARNING: Apparent symbolic reference PASSWD not resolved.
ERROR: CLI error trying to establish connection: Unable to retrieve error message.
ERROR: Error in the LIBNAME statement.

*****  

 

As an alternative I am able to connect in SAS using this.

 

libname conf odbc complete="driver=SQL Server;
                              database=mainframe;
                              server=servername"
                    schema=conformed;

3 REPLIES 3
ballardw
Super User

The warnings indicate that YOUR session has not assigned values to the macro variables &uname and &passwd.

Your coworkers may execute a script that sets the values for those macro variables. The code might look like

%let uname=SomeValidUsername;
%let passwd=ValidPassword;

See if specifying your user name and password before attempting that libname statement allows the connection.

 

There may also be settings related to the connection to that data source that would require talking to your SAS Admin to make sure the configuration and permissions are set correctly.

Rerickson123
Calcite | Level 5

Thanks - I should have mentioned, I manually entered in my User Name and Password, I get the bottom 2.

 

ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver
specified


ERROR: Error in the LIBNAME statement.

 

Is it correct for me to say, that there is no difference between how versions 6.x and 8.x would behave for this script? 

 

 

ballardw
Super User

I would be very surprised to find differences in how Libname or Filename statements behave.

 

ODBC connections can be operating system dependent. So if you are not running the same OS, or possibly the same version of the OS that might start the issues. Next you have to have the ODBC set up correctly which means each machine is likely to need configuration to make the link available. So you may need some admin help in configuring ODBC and making sure that you have the correct file drivers installed on both ends of the link.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 668 views
  • 0 likes
  • 2 in conversation