|
Iteratively process data from a SAS
data set. |
- Copy the program below and paste it into the Program Editor window (or issue the command
copy sashelp.oltutor..source ).
data work.totals(drop=i balance
interest);
set finance.loans;
?
TotalInterest=0;
do ?
Interest=balance*(rate/12);
balance+interest-payment;
totalinterest+interest;
?
run;
Complete the DATA step to compute the interest on several loans. Create
the variable Balance equal to the data set variable
Amount . Then construct a DO loop to execute the variable
i from 1 to the value of the data set variable
Months .
-
Submit the DATA step and correct any errors; then print the data set.
Return here and select Next.
|
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA.
All rights reserved.
Terms of Use & Legal Information
| Privacy Statement