A view descriptor defines
some or all of the data that is described by one access descriptor
(and, therefore, one PC file). For example, you might want to use
only three of nine possible database columns and only some of the
rows in a PC file. The view descriptor enables you to do this by selecting
the database fields or columns that you want to use and specifying
criteria to retrieve only the rows that you want. Typically, you create
several view descriptors based on one access descriptor, where each
view descriptor selects a different subset of the PC files data.
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 the SET statement of a DATA step. You can use
a view descriptor in a SELECT statement of the SQL procedure to join
view descriptor data with SAS data, for example.
You can use a view descriptor
to update data directly in some of the PC file formats, such as the
DBF file format.
In some cases, you might
also want to create a SAS data file from data stored in a PC file.
Using a view descriptor to copy PC files data into a SAS data file
is called extracting the data.
When you create a view
descriptor, the RESET statement clears any columns that were included
in the SELECT statement.
When creating the view
descriptor, if you reset a SAS variable and select it again within
the same procedure execution, the SAS variable names and formats are
reset to their default values. The defaults are generated from the
column names and data types. This applies only if you have omitted
the ASSIGN statement or set the value to NO when you created the access
descriptor.
If you specified ASSIGN=
YES when you created the access descriptor, the RESET = option has
no effect on the view descriptor.
Use a view descriptor
to update data directly in some of the PC file formats, such as the
DBF file format.
Create a SAS data set
from data stored in a PC file. When a view descriptor is used to
copy PC files data into a SAS data set is called extracting the data.