Comparing DATA Step and PROC SQL Views

To help you decide between a DATA step view and a PROC SQL view, consider the characteristics of each type of SAS view:
  • DATA step views
    • DATA step views are versatile because they use DATA step processing, including DO loops and IF-THEN/ELSE statements.
    • DATA step views do not have Update capability. That is, they cannot directly change the data that they access.
    • There is no way to qualify the data in a DATA step view before using it. Therefore, even if you need only part of the data in your SAS view, you must load into memory the entire DATA step view and discard everything that you do not need.
  • PROC SQL views
    • PROC SQL views can combine data from many different file formats.
    • PROC SQL views can both read and update the data that they reference.
    • PROC SQL supports more types of WHERE clauses than are available in DATA step processing and has a CONNECT TO component that enables you to easily send SQL statements and pass data to a DBMS by using the pass-through facility.
    • You can also use the SQL language to subset your data before processing it. This capability saves memory when you have a large SAS view, but need to select only a small portion of the data contained in the view.
    • PROC SQL views do not use DATA step programming.