[R] Reasons to Use R

Jeffrey J. Hallman jhallman at frb.gov
Tue Apr 10 14:35:09 CEST 2007


"halldor bjornsson" <halldor.bjornsson at gmail.com> writes:
> ...
> Now, R does not have everything we want. One thing missing is a decent
> R-DB2 connection, for windows the excellent RODBC works fine, but ODBC
> support on Linux is  a hassle. 
> ....

A hassle?  I use RODBC on Linux to read data from a mainframe DB2 database.  I
had to create the file .odbc.ini in my home directory with lines like this:

[m1db2p]
Driver             = DB2
Servername         = NameOfOurMainframe
Database           = fdrp
UserName           = "NachoBizness"
TraceFile          = /home/NachoBizness/.odbc.log

and then to connect I do this:

Sys.putenv(DB2INSTANCE = "db2inst")
myConnection <- odbcConnect(dsn = "m1db2p", uid = uid, pwd = pwd, case = "toupper")

with 'uid' and 'pwd' set to my mainframe uid and password.

Now, I am not the sysadmin for our Linux machines, but I don't think they had
to do much beyond the standard rpm installation to get this working.  

-- 
Jeff



More information about the R-help mailing list