// Create dataset. data quiz-scores; input name score; datalines; William 95 Jenna 92 Scott 89 Carla 94 proc means / mean;
data test; input x y @@; datalines; 1 1 2 3 3 2 4 4 ; proc reg; model y = x; run; quit;
data kids; name = "Alice"; gender = "F"; age = 11;To create a dataset with more than one observation:
data kids; name = "Alice"; gender = "F"; age = 11; output; name = "Scott"; gender = "M"; age = 12; output;The default behavior is to send the data the data step to the dataset automatically each time the end of the data step is reached. If you want to send an observation to the dataset in the middle of the the data step, use the output statement. However, if you use any output statements in a data step, you must use them every time you want to send an observation to the dataset, even at the end of the data step.
|
|
Pointer | Meaning |
---|---|
m-n | Read data from column n to column n. |
n | Read one character from column n. |
@n | Move pointer to column n for subsequent reading. |
+n | Move pointer n characters forward for subsequent reading. |
/ | Move to next line of input. |
#n | Move to line n of input. |
@'chars' | Move to past 'chars' character string. |