Previous Page | Next Page

Working with SAS Data Sets

Reading Observations from a SAS Data Set

Transferring data from a SAS data set to a matrix is done by using the READ statement. The SAS data set you want to read data from must already be open. You can open a SAS data set with either the USE or the EDIT statement. If you already have several data sets open, you can point to the one you want with the SETIN statement, making it the current input data set. The general form of the READ statement is as follows:

READ <range> <VAR operand> <WHERE(expression)> ;
<INTO name> ;

where

range

specifies a range of observations.

operand

selects a set of variables.

expression

is an expression that is evaluated as being true or false.

name

names a target matrix for the data.

Previous Page | Next Page | Top of Page