Chapter Contents

Previous

Next
The IMPORT Procedure

Example 3: Importing a Microsoft Access Table


Procedure features:
PROC IMPORT statement arguments:
TABLE=
DBMS=
Data source Statements:
DATABASE=
PWD=
UID=
WGDB=

This example imports a Microsoft Access table and creates a permanent SAS data set named SASUSER.CUST. The Access table has user-level security, so it is necessary to specify values for the PWD=, UID=, and WGDB= statements.


Program
 Note about code
proc import table="customers"
 Note about code
            out=sasuser.cust
 Note about code
            dbms=access;
 Note about code
   uid="userid";
 Note about code
   pwd="mypassword";
 Note about code
   database="c:\myfiles\east.mdb";
 Note about code
   wgdb="c:\winnt\system32\security.mdb";
 Note about code
proc print data=sasuser.cust(obs=5);
run;


Output
The following output displays the first five observations of the output data set, SASUSER.CUST.

                                 The SAS System                                 1

Obs    Name                                  Street                           Zipcode

  1    David Taylor                          124 Oxbow Street                 72511
  2    Theo Barnes                           2412 McAllen Avenue              72513
  3    Lydia Stirog                          12550 Overton Place              72516
  4    Anton Niroles                         486 Gypsum Street                72511
  5    Cheryl Gaspar                         36 E. Broadway                   72515


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.