Transforming Data with SAS Functions | |
General Form of SAS Functions |
Target Variables
Now that you are familiar with the purpose and general form of SAS functions,
let's think about target variables. A target variable is
the variable to which the result of a function is assigned. For example,
in the statement below, the variable AvgScore=mean(exam1,exam2,exam3); Unless the length of the target variable is previously defined, a default length is assigned. For a few character functions, the default length of the target variable is 200. Default lengths may cause variables to use more space than necessary in your data set. So, when using SAS functions, consider the appropriate length for any target variables and specify those lengths using a LENGTH statement when necessary. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.