-
Once the WHERE clause is specified, it applies to
the statements that follow it. It also crosses RUN boundaries.
-
The SAVE statement is subject to the WHERE clause.
As a result, the records from the Prdsale table that meet the WHERE
clause are saved to /dept/sales/y1994q1.sashdat. The FULLPATH option
is used to specify the table name instead of using the name of the
active table. This is particularly useful when saving temporary tables.
-
The DELETEROWS statement is also subject to the WHERE
clause. The records that were just saved to HDFS are now deleted and
purged from memory. (The DELETEROWS statement without the PURGE option
would mark the records for deletion and exclude them from being used
in calculations, but it does not free the memory resources.)
-
The WHERE clause is cleared and the SUMMARY statement
that follows is performed against all the remaining records in the
Prdsale table.
This pattern of using a WHERE clause to subset an in-memory table, save the records
to HDFS, and then delete them can be combined with the APPEND data set option of the
SAS LASR Analytic Server engine.
You can create a sliding window for keeping months or years of data
in memory for analysis, yet keeping it up-to-date by appending the
most recent records.