| Language Reference |
displays observations of a data set
| Operand | Example |
| a single record number | point 5 |
| a literal giving several | point {2 5 10} |
| record numbers | |
| the name of a matrix | point p |
| containing record numbers | |
| an expression in parentheses | point (p+1) |
var {time1 time5 time9}; /* a literal giving the variables */
var time; /* a matrix containing the names */
var('time1':'time9'); /* an expression */
var _all_; /* a keyword */
The WHERE clause conditionally selects
observations, within the range specification,
according to conditions given in the clause.
The general form of the WHERE clause is
WHERE comparison arguments can be matrices. For the following operators, the WHERE clause succeeds if all the elements in the matrix satisfy the condition:
| ^= ^? < <= > >= |
For the following operators, the WHERE clause succeeds if any of the elements in the matrix satisfy the condition:
| = ? =: =* |
Logical expressions can be specified within the WHERE clause by using the AND (&) and OR (|) operators. The general form is as follows:
| clause&clause | (for an AND clause) | |
| clause|clause | (for an OR clause) |
where clause can be a comparison, a parenthesized clause, or a logical expression clause that is evaluated by using operator precedence.
Note: The expression on the left-hand side refers to values of the data set variables and the expression on the right-hand side refers to matrix values.
The following examples demonstrate the use of the LIST statement:
list all; /* lists whole data set */
list; /* lists current observation */
list var{name addr}; /* lists NAME and ADDR in current obs */
list all where(age>30); /* lists all obs where condition holds */
list next; /* lists next observation */
list point 24; /* lists observation 24 */
list point (10:15); /* lists observations 10 through 15 */
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.