data work.invest;
do year=1 to ? ;
Capital+2000;
capital+capital*.10;
end;
run;
Syntax, DO UNTIL statement:
DO UNTIL(expression);
...more
SAS statements...
END;
|
data work.invest; do until(Capital>=50000); capital+2000; capital+capital*.10; Year+1; end; run;
Syntax, DO WHILE statement:
DO WHILE(expression);
...more
SAS statements...
END;
|
50,000
,
the DO loop does not execute. data work.invest; do while(Capital>=50000); capital+2000; capital+capital*.10; Year+1; end; run;