SYSTEM 2000 where-clause in View Descriptor
|
WHERE Clause in SAS
Program
|
Connected Conditions
|
---|---|---|
C1 = A
|
C110 > 27
|
(C1 = A) & (C110
> 27)
|
*SAS* & C1 = A
|
C110 > 27
|
(C110 > 27) &
C1 = A
|
C1 = 'A' *ANDSAS*
|
C110 > 27
|
C1 = 'A' AND (C110 >
27)
|
Connecting String
|
Expands to
|
---|---|
*SAS*
|
(SAS-conditions)
|
*ANDSAS*
|
AND (SAS-conditions)
|
*SASAND*
|
(SAS-conditions)
AND
|
*ANDNK*
|
AND (NK (SAS-conditions))
|
*NKAND*
|
(NK (SAS-conditions))
AND
|
*ANDAT(n)
|
AND ((SAS-conditions)AT n)
|
*ATAND(n)
|
((SAS-conditions)
AT n) AND
|
*ANDHAS(record)
|
AND (record HAS
(SAS-conditions))
|
*HASAND(record)
|
(record HAS
(SAS-conditions))AND
|
*HASSAS(record)
|
(record HAS
(SAS-conditions))
|
*NKSAS*
|
NK (SAS-conditions)
|
*SASAT(n)
|
(SAS-conditions)AT n
|
C1 = A AND *SAS*The following syntax is not acceptable:
C1 = A *ANDSAS*however, you can use the preceding syntax if you include a delimiter (special character.) In the following example, the delimiter is a set of single quotation marks:
C1 = 'A' *ANDSAS*
C1 = A AND *SAS*Then, you issue a SAS program specifying a WHERE clause that produces the following SYSTEM 2000 condition:
C110 > 27If you do not specify a WHERE clause in the SAS program, the "dangling connector" would result in a SYSTEM 2000 error.
C1 = A ANDIf you want the flexibility of omitting the WHERE clause in SAS, you can use the *ANDSAS* or *SASAND* connecting string. For example,
C1 = 'A' *ANDSAS*Then, even if you did not specify a WHERE clause in SAS, there would not be a problem. The result would be:
C1 = 'A'
C1 = A OR *SAS* C1 = C OR (C1 = A OR C1 = B) *ANDSAS*
(C1 = A OR C1 = B) AND *SAS*
SYSTEM 2000 where-clause in View Descriptor
|
WHERE Clause in
SAS
|
Selection Criteria
|
---|---|---|
C1='A' *ANDNK*
|
C2=B OR C3=X
|
C1='A' & (NK C2=B
OR NK C3=X)
|
C1='A' *ANDNK*
|
C1='A'
|
|
C1='A' *ANDHAS(C0)
|
C21=B & C22=X
|
C1='A' AND (C0 HAS (C21=B
& C22=X))
|
*ATAND(12) C1=A
|
C21=B
|
C21=B AT 12 & C1=A
|