Help using Base SAS procedures

IMPORT ACCESS(mdb) files

Reply
Occasional Contributor
Posts: 16

IMPORT ACCESS(mdb) files

I will to open the access(mdb) file. Its name is prescription.mdb and is stored in the "Z" drive. I want to use proc import. I am getting a message saying "FILE= or TABLE= is required and must be specified". Please can someone help me.


PROC IMPORT datafile="Z:\prescription.mdb"
out=prescription
dbms=ACCESS
replace;
run;
proc print;run;
Super Contributor
Super Contributor
Posts: 3,174

Re: IMPORT ACCESS(mdb) files

From the SAS support http://support.sas.com/ website and the discussion on PROC IMPORT.

Scott Barry
SBBWorks, Inc.

SAS/Access - PROC IMPORT Statement
http://support.sas.com/documentation/cdl/en/acpcref/61891/HTML/default/a003102095.htm
Occasional Contributor
Posts: 16

Re: IMPORT ACCESS(mdb) files

I have tried, but still i can't solve the problem. Please, can you have a look at me data steps and kindly advise me on that. What is the mistake on my program?

PROC IMPORT datafile="Z:\prescription.mdb"
out=mymdb
dbms=ACCESS
replace;
run;
Super Contributor
Super Contributor
Posts: 3,174

Re: IMPORT ACCESS(mdb) files

After reading the DOC, what part of the SAS error message does not make sense? There are required parameters that are not specified, so the error occurs.

Also, you may want to explore using the SAS LIBNAME ACCESS ....; statement approach - see link to SAS-hosted DOC below:

http://support.sas.com/documentation/cdl/en/acpcref/61891/HTML/default/a002107496.htm


Scott Barry
SBBWorks, Inc.
Trusted Advisor
Posts: 2,113

Re: IMPORT ACCESS(mdb) files

Your syntax is more appropriate to a file than a database. You need the TABLE= and other parameters. See
http://support.sas.com/documentation/cdl/en/acpcref/61891/HTML/default/a003103770.htm
for 9.2 specifics on Access DBs.
Super Contributor
Posts: 291

Re: IMPORT ACCESS(mdb) files

code that works that may give you some direction ...

PROC IMPORT OUT= WORK.NewOrdFaults
DATATABLE= "NewOrderFaults"
DBMS=ACCESS REPLACE;
DATABASE="\\Moftp\MainFrameFtp\ESADOWN\NewOrderFaults.MDB";
SCANMEMO=YES;
USEDATE=YES;
SCANTIME=NO;
RUN;
Ask a Question
Discussion stats
  • 5 replies
  • 632 views
  • 0 likes
  • 4 in conversation