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;
SAS Innovate 2025: Save the Date
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!