You can use the SAS
variable name of a data field within a periodic group in both a SAS
WHERE clause and a view WHERE clause. However, they do not always
produce the same results because the SAS WHERE clause post-processes
the results and, using the following example, looks at the value of
variable LIMIT to determine whether it is equal to 5000. The view
WHERE clause is not post-processed. When you use a periodic group
field,
ADABAS qualifies
all periodic group occurrence values if any one meets the WHERE clause
criteria.
For example, you can
include the following WHERE clause in a view descriptor, and you can
issue it as a SAS WHERE clause:
where limit = 5000
Stored in a view descriptor, the WHERE clause produces the results
in the following output:
Results of Referencing a Periodic Group Data Field in View
a WHERE Clause
OBS CUSTNUM SL_OCCUR LIMIT
1 12345678 1 5000.00
2 14324742 1 5000.00
3 14324742 2 25000.00
4 14569877 1 5000.00
5 14569877 2 100000.00
6 19783482 1 5000.00
7 19783482 2 10000.00
8 26422096 1 5000.00
9 26422096 2 10000.00
10 27654351 1 5000.00
11 29834248 1 5000.00
However, as a SAS WHERE
clause, the results in the following output are produced.
Results of Referencing Periodic Group Data Field in SAS WHERE
Clause
OBS CUSTNUM SL_OCCUR LIMIT
1 12345678 1 5000.00
2 14324742 1 5000.00
3 14569877 1 5000.00
4 19783482 1 5000.00
5 26422096 1 5000.00
6 27654351 1 5000.00
7 29834248 1 5000.00
8 43459747 2 5000.00