Chapter 27
SAS Views
Definition of SAS Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
Benefits of Using SAS Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
When to Use SAS Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
DATA Step Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
Definition of a DATA Step View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
Creating DATA Step Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
What Can You Do with a DATA Step View? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Differences between DATA Step Views and Stored Compiled
DATA Step Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Restrictions and Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
Example 1: Merging Data to Produce Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
Example 2: Producing Additional Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
PROC SQL Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
Comparing DATA Step and PROC SQL Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
SAS/ACCESS Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
Definition of SAS Views
A SAS view is a type of SAS data set that retrieves data values from other files. A SAS
view contains only descriptor information such as the data types and lengths of the
variables (columns). A SAS view also contains information that is required for retrieving
data values from other SAS data sets or from files that are stored in other software
vendors' file formats. SAS views are of member type VIEW. In most cases, you can use
a SAS view as if it were a SAS data file.
There are two general types of SAS views:
native view
is a SAS view that is created either with a DATA step or with PROC SQL.
interface view
is a SAS view that is created with SAS/ACCESS software. An interface view can
read data from or write data to a database management system (DBMS) such as DB2
or ORACLE. Interface views are also referred to as SAS/ACCESS views. In order to
use SAS/ACCESS views, you must have a license for SAS/ACCESS software.
669
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.163.13