07-27-2012 01:34 PM
I support Windows SAS for a bunch of users.
Here is a problem reading DB2 through ODBC, using 9.3 on a 64 bit machine with 64 bit DB2 Connect:
A number of users run code like this:
libname in odbc complete="dsn=M1DB2P;Uid=xxxxx;pwd=xxxxx" schema=fdrp;
and it works fine assigning the libref and can be used to read the data fine. (So we know the ODBC driver is ok.)
But when they want to enter id and pswd in popup boxes and run this:
libname in odbc complete="dsn=M1DB2P" schema=fdrp;
they get this error:
ERROR: CLI error trying to establish connection: [IBM][CLI Driver] SQL1013N The database alias name or database name " " could not be found. SQLSTATE=42705
Making it more difficult for me to debug, I can run both version on my own machine just fine.
Everything seems the same between my machine and theirs.
All thoughts greatly appreciated,
With all the same conditions, I do not get the
07-27-2012 03:03 PM
Try without the complete="...", i.e.,
libname in odbc dsn=M1DB2P schema=fdrp;
My libname statements work without this options, for instance for Oracle or Taradata.
Alternatively try adding PROMPT= "uid=;pwd=;"
06-13-2013 06:41 AM
Try the following code this might solve your problem.
#5 @5 'Please enter userid:'
#5 @26 id 8 attr=underline
#7 @5 'Please enter password:'
#7 @28 pass 8 attr=underline display=no;
libname in odbc complete="dsn=M1DB2P;Uid= &id; pwd=&pass" schema=fdrp;