Debugging and Testing DATA Steps |
Understanding DATA Step
Processing |
Execution Phase
After the DATA step is compiled, it is ready for execution. During the execution phase, the data portion of the data set is created. The data portion contains the data values. |
During execution, each observation in the input data set
is processed, stored in the program data vector, and then written to the
new data set as an observation, unless otherwise directed. The DATA step
executes once for each observation in the input data set. For example, this
DATA step will execute four times because there are four observations in
the input data set Finance.Loans.
data finance.duejan; set finance.loans; Interest=amount*(rate/12); run; |
SAS Data Set Finance.Loans
Account
Amount
Rate
Months
Payment
101-1092
22000
0.1000
60
467.43
101-1731
114000
0.0950
360
958.57
101-1289
10000
0.1050
36
325.02
101-3144
3500
0.1050
12
308.52
At the beginning of the execution phase, the value of _N_
is 1. Because there are no data errors, the value of _ERROR_
is 0. |
The remaining variables are initialized to missing. Missing numeric values are represented by a period, and missing character values are represented by a blank. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.