Syntax, DO statement,
iterative:
DO index-variable=specification-1 <,
...specification-n>;
...more SAS statements...
END;
|
data finance.earnings; set finance.master; Earned=0; earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); earned+(amount+earned)*(rate/12); run;
data finance.earnings; set finance.master; Earned=0; do month=1 to 12; earned+(amount+earned)*(rate/12); end; run;
DO index-variable=start TO stop BY increment; ...more SAS statements... END;
Do index-variable=start TO stop BY increment; ...more SAS statements... END;
DO index-variable=start TO stop BY increment; ...more SAS statements... END;
DO index-variable=start TO stop BY increment; ...more SAS statements... END;
DO index-variable=start TO stop BY increment; ...more SAS statements... END;
do quiz=1 to 5;
do rows=2 to 12 by 2;