Hello, I am using Drivers for JDBC to connect in my SAS Workspace.
It is working good for all my BASE libraries, the problem is when I try to connect to a ODBC library.
 
Class.forName("com.sas.rio.MVADriver");
Connection connection = DriverManager.getConnection("jdbc:sasiom://myserver.local:8591?librefs=MYLIBNAME '/sasdata/MYLIBNAME'", "myuser", "mypass");
This connection is working well, but I don't know how to set a libref when the library is ODBC and don't have a path like '/sasdata/MYLIBNAME';
 
When I list the libs, using: "libname _all_ list;" the result for are:
 
First: I can connect (BASE lib)
Libref= MYLIBNAME 
Scope= IOM ROOT COMP ENV
Engine= META
Physical Name= /sasdata/MYLIBNAME
Filename= /sasdata/MYLIBNAME
Inode Number= 131073
Access Permission= rwxrwx---
Owner Name= myuser
File Size= 96KB
File Size (bytes)= 98304
 
Second: This I can't connect (ODBC lib)
Libref= BI 
Scope= IOM ROOT COMP ENV
Engine= META
Physical Name= BI
Schema/Owner= BI_STAGE
Like you can see, in the second (ODBC lib) I don't have a Physical Name and Filename.
 
So I don't know how to crate a connection in Java:
 
Class.forName("com.sas.rio.MVADriver");
Connection connection = DriverManager.getConnection("jdbc:sasiom://myserver.local:8591?librefs=BI 'BI'", "myuser", "mypass");This way doesn't work!
 
Can you help me how I can assign the odbc lib in my Java connection?
 
Thanks,
Gustavo