SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Generating Data with DO Loops
Iteratively Processing Data Read from a Data Set


Question: How many times does the DO loop execute this first iteration of the DATA step?

data work.compare(drop=i);
   set finance.cdrates;
   Investment=5000;
   do i=1 to years;
      investment+rate*investment;
   end;
run;
SAS Data Set Finance.Cdrates
Institution Rate Years
MBNA America 0.0817 5
Metropolitan Bank 0.0814 5
Standard Pacific 0.0806 5


           


  back||next

 

Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement