[R] SAS ODBC & R

partha_bagchi@hgsi.com partha_bagchi at hgsi.com
Mon Aug 30 20:23:25 CEST 2004


This mornings message regarding SAS to R datasets got me thinking about 
ODBC access to SAS datasets. Has anyone tried to do that?

I have been attempting to connect to a SAS Server (local) using RODBC and 
have met with 0 success.

Basically, I am able to connect to the server and assign a connection. 
However, if I try sqlTables(connect) then I get 0 rows and consequently no 
datasets can be read. 

I maybe missing something here and will be happy to provide more 
information if necessary.

However, note that if I use MS Access to connect, I get the following 
message in the SAS log:

98 SAS server SHR1 started.
30AUG2004:14:13:25.229 User pbagchi(1) has connected to server SHR1.
30AUG2004:14:13:25.229 User pbagchi(1) is executing release 2.1 of the 
Remote Engine Emulator (41) of SAS (r) on SAME architecture
                       host type: .
30AUG2004:14:13:25.229 pbagchi(1) in "ODBCAPPL"(0) has connected to 
SQLVIEW.
30AUG2004:14:13:25.229 Server library USER ('c:\analysis' V8) accessed as 
USER by "ODBCAPPL"(0) of user pbagchi(1).
30AUG2004:14:13:25.299 When pbagchi(1) in "ODBCAPPL"(0) called prepare for 
SELECT Config, nValue FROM MSysConf from SQLVIEW:
                       ERROR: SQL passthru expression contained these 
errors: ERROR: File USER.MSYSCONF.DATA does not exist....  .
30AUG2004:14:13:48.322 Work task SHRWTSK8 has been terminated.

(But I am able to access the SAS dataset and create an access table from 
it).

If I use RODBC to connect, I get the following in the log:

30AUG2004:14:20:18.303 SAS server SHR1 started.
30AUG2004:14:20:18.854 User pbagchi(1) has connected to server SHR1.
30AUG2004:14:20:18.854 User pbagchi(1) is executing release 2.1 of the 
Remote Engine Emulator (41) of SAS (r) on SAME architecture
                       host type: .
30AUG2004:14:20:18.864 pbagchi(1) in "ODBCAPPL"(0) has connected to 
SQLVIEW.
30AUG2004:14:20:18.864 Server library USER ('c:\analysis' V8) accessed as 
USER by "ODBCAPPL"(0) of user pbagchi(1).
30AUG2004:14:20:43.179 Work task SHRWTSK8 has been terminated.




More information about the R-help mailing list