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;
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.