Technically, the DO UNTIL loop executes at least once even if the original value of PRICE is 600000 instead of 100000. To get a DO WHILE loop to produce the same outcome, you need to allow for that fact. So:
data hadoopdata;
price=100000;
year+1;
price = price * 1.1;
do while (price le 500000);
year + 1;
price = price * 1.1;
end;
run;
Technically, the DO UNTIL loop executes at least once even if the original value of PRICE is 600000 instead of 100000. To get a DO WHILE loop to produce the same outcome, you need to allow for that fact. So:
data hadoopdata;
price=100000;
year+1;
price = price * 1.1;
do while (price le 500000);
year + 1;
price = price * 1.1;
end;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!