Deciding How to Specify Selection Criteria

When to Use View WHERE Clause or SAS WHERE Clause

Use the following guidelines to determine when to use a SAS WHERE clause and when to use a view WHERE clause.

View WHERE Clause

Include a WHERE clause in your view descriptor when you want to do the following:
  • restrict users of view descriptors to certain subsets of data
  • prevent users from sequentially passing all the ADABAS data
  • use syntax not available in the SAS WHERE clause, such as periodic group occurrence syntax or multiple-value compares.

SAS WHERE Clause

Use a SAS WHERE clause when the previous guidelines do not apply and you want to meet the following criteria:
  • have more run-time flexibility in subsetting data
  • use SAS WHERE clause capabilities that the view WHERE clause does not support, such as arithmetic expressions, truncated comparisons, or pattern matching
  • use conditions on fabricated data fields such as ISN, periodic group _OCCUR variables, or any individually selected multiple-value fields
  • combine AND and OR conditions using non-descriptor data fields.