Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Working with SAS Data Sets

Reading Observations from a SAS Data Set

Transferring data from a SAS data set to a matrix is done 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

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 for being true or false.

name
names a target matrix for the data.

Using the READ Statement with the VAR Clause

Using the READ Statement with the VAR and INTO Clauses

Using the READ Statement with the WHERE Clause

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.