Chapter Contents |
Previous |
Next |
SAS/ACCESS Software for Relational Databases: Reference |
Access Descriptors |
An access descriptor only describes a DBMS table's format and contents to SAS software; that is, it is a master file of the table's information for SAS software. You cannot use an access descriptor in a SAS program; rather, you use an access descriptor to create other SAS files, called view descriptors, that you use in SAS programs.
Creating an Access Descriptor and View Descriptors for a DBMS Table illustrates the access descriptor creation process. Note that an access descriptor, which contains the metadata of the DBMS table, must be created before view descriptors can be created.
Creating an Access Descriptor and View Descriptors for a DBMS Table
View Descriptors |
A view descriptor is a SAS data set or, more specifically, a SAS data view. You use a view descriptor in a SAS program much as you would any SAS data set. For example, you can specify a view descriptor in the DATA= statement of a SAS procedure or in the SET statement of a DATA step.
A view descriptor can also be used to update data in a DBMS table directly, if you have been granted the authority to do so. For example, you can specify a view descriptor to add or delete rows in a DBMS table or to change the values in a field by using the SQL procedure or the View Table option in the SAS Explorer window. See Using DBMS Data with the SQL Pass-Through Facility for examples of updating DBMS data.
In some cases, you might also want to create a SAS data file from DBMS data. When you use a view descriptor to copy DBMS data into a SAS data file, it is called extracting the data. You can extract DBMS data in a number of ways. For example, you can extract the data by using various methods within the ACCESS procedure, a DATA step, or the OUT= option in a SAS procedure. (See ACCESS Procedure Syntax for more information.) When you need to use DBMS data in a number of procedures or DATA steps, extracting the data into a SAS data file may use fewer resources than repeatedly accessing the data directly.
Creating an Access Descriptor and View Descriptors for a DBMS Table illustrates the relationships among a DBMS table, an access descriptor, and one or more view descriptors. Using a View Descriptor to Access a DBMS Table illustrates the relationship between view descriptors, which store a query, and a DBMS tables or view.
Using a View Descriptor to Access a DBMS Table
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.