Bill,
I started out exporting ASCII files then reading them into R:BASE as
well. What a pain to keep adjusting the read statements every time a
column length changed! I next moved to exporting comma delimited files
which was a great improvement. Then I learned to use ODBC which is very
cool.
I use the LIBNAME statement in SAS to connect by ODBC to my R:BASE
database like this (Database name is DOX08):
LIBNAME RDOX08 ODBC DATASRC=DOX08 USER=PASSWORD
PASSWORD=PASSWORD;
RUN;
Then I just read from the tables as if they were SAS datasets (R:BASE
table name is MSPEC.).
DATA MSPEC;
SET RDOX08.MSPEC;
WHERE STUDYNO = '080001';
RUN;
Once you have read in the data you need to close the ODBC connection in
a multiuser environment so you aren't locking other users out of the
database while you tweak your SAS code.
LIBNAME RDOX08 CLEAR;
I hope this helps.
Cheryl
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Bill
Niehaus
Sent: Friday, March 13, 2009 11:43 AM
To: [email protected]
Subject: [RBASE-L] - SAS and RBase
Has anyone used PROC SQL in SAS to read information from an RBase
database?
I currently generate ASCII files from RBase and then use SAS to read the
ASCII files. I am just looking into options to read the most current
data from RBase.
Thanks for any suggestions on where to start on such a project.
Bill Niehaus