Chapter Contents |
Previous |
Next |
Instream Data |
The following example uses the INPUT statement to read in instream data:
data weight; input PatientID $ Week1 Week8 Week16; loss=Week1-Week16; datalines; 2477 195 177 163 2431 220 213 198 2456 173 166 155 2412 135 125 116 ;
Note: A semicolon appearing alone on the line immediately following
the last data line is the convention that is used in this example. However,
a PROC statement, DATA statement, or global statement ending in a semicolon
on the line immediately following the last data line also submits the previous
DATA step.
Instream Data Containing Semicolons |
The following example reads in instream data containing semicolons:
data weight; input PatientID $ Week1 Week8 Week16; loss=Week1-Week16; datalines4; 24;77 195 177 163 24;31 220 213 198 24;56 173 166 155 24;12 135 125 116 ;;;;
External Files |
data weight; infile file-specification or path-name; input PatientID $ Week1 Week8 Week16; loss=Week1-Week16; run;
Note: See the SAS documentation for your operating environment
for information on how to specify a file with the INFILE statement.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.