You use the SUBSET statement to specify selection criteria
when you create a view descriptor. This statement is optional. If
you omit it, the view retrieves all the data (that is, all the rows)
in the DBMS table.
An editing statement,
such as SUBSET, must follow the CREATE statement when you create a
view descriptor.
See CREATE Statement for more information about the order of statements.
The selection-criteria
argument can be either a WHERE clause or a SORT clause. For more
information about the WHERE clause, see
WHERE Clause in an ADABAS View Descriptor. For more information about the SORT
clause, see
SORT Clause in a View Descriptor. You can use either SAS variable names or DBMS column names,
in your selection criteria. Specify your WHERE clause and SORT clause
by using separate SUBSET statements. For example, you can submit
the following SUBSET statements:
subset where jobcode = 1204;
subset sort lastname;
SAS does not check the
SUBSET statement for errors. The statement is verified and validated
only when the view descriptor is used in a SAS program.
To delete the selection
criteria, submit a SUBSET statement without any arguments.