|
Chapter Contents |
Previous |
Next |
| Language Reference |
repeats a loop until an end of file occurs
The inputs to the DO DATA statement are as follows:
Examples of valid statements follow. The first example inputs the variable NAME from an external file for the first 100 lines or until the end of file, whichever occurs first.
do data i=1 to 100;
input name $8.;
end;
Or, if reading from a SAS data set, then the code can be
do data; /* read next obs until eof is reached */
read next var{x}; /* read only variable X */
end;
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.