SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Search||next

Accessing Other Vendors' DBMS Data
Lesson Overview


Introduction

If you have data stored in other vendors' database products, you can access it and reference it in your SAS programs as if it were in SAS data sets. SAS/ACCESS software enables the SAS System to share data with DB2, ODBC, ORACLE, SYBASE and other relational database management systems (DBMS). You can treat a DBMS like any SAS library, and your programs can read and write data between the SAS System and a DBMS.

Sharing data between the SAS System and a DBMS

This lesson explains how to reference a DBMS as a SAS library, use DBMS objects (such as tables) as SAS data sets in your SAS programs, and use the SQL Procedure Pass-Through Facility to send DBMS-specific SQL statements directly to a DBMS.

This lesson contains 31 pages and takes approximately 45-60 minutes to complete.

Note:

Because accessing DBMS data is specific to your operating environment and your SAS installation, this lesson does not contain guided practices. However, if you have DBMS data and the related SAS/ACCESS software components, you can practice on your own throughout the lesson. Keep in mind that in order to perform many of the examples shown in the tutorial, you will need to have the appropriate update or write privileges for your database.

If you want to create practice DBMS data, you can submit sample SAS programs. From SAS software, select Help SAS System Help. Then select Sample SAS Programs and Applications. From the SAS Sample Library, choose SAS/ACCESS programs for the DBMS you want to use. Data in these sample programs is different from the examples shown in this lesson, so you can choose whatever data is most appropriate for your needs. Be sure to follow the directions in whatever program you submit.


Objectives

In this lesson, you learn to

  • associate a libref with a DBMS database in the Explorer window
  • associate a libref with a DBMS database in a SAS/ACCESS LIBNAME statement
  • access DBMS data from within a SAS program
  • query, analyze, modify, and combine DBMS data
  • pass processing of SQL statements to a DBMS.


Prerequisites

Before taking this lesson, you should have completed the following lessons:

Introduction to SAS Programming

Producing Basic Reports

||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement