Chapter Contents |
Previous |
Next |
Reading a Single SAS Data Set |
data perm.tour155_peakcost; set perm.tour155_basic_cost; Total_Cost=AirCost+LandCost; Peak_Cost=(AirCost*1.15); Average_Night_Cost=LandCost/Nights; run;
Reading from Multiple SAS Data Sets |
For details about reading from multiple SAS data sets, see Combining SAS Data Sets: Methods.
Controlling the Reading and Writing of Variables and Observations |
Task | Statements | Data set options | System options | |
---|---|---|---|---|
Control variables | DROP | DROP= | ||
KEEP | KEEP= | |||
RENAME | RENAME= | |||
Control observations | WHERE | WHERE= | FIRSTOBS= | |
subsetting IF | FIRSTOBS= | OBS= | ||
DELETE | OBS= | |||
REMOVE | ||||
OUTPUT | ||||
Use statements or data set options (such as KEEP= and DROP=) to control the variables and observations you want to write to the output data set. The WHERE statement is an exception: it controls which observations are read into the program data vector based on the value of a variable. You can use data set options (including WHERE=) on input or output data sets, depending on their function and what you want to control. You can also use SAS system options to control your data.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.