I have this code. I guess the stored value for Year will be 2004. However, when I put this code in SAS. the result appears stored value for YEAR as 2005. Could anyone help me to understand this code, please?
DATA work.invest;
VALUE = 2000;
DO year = 1990 TO 2004;
Capital + 5000;
Capital + (Capital*0.10);
END;
RUN;
After the 15th execution of the DO loop (corresponding to year=2004), the value of Year is incremented to 2005. Because 2005 exceeds the stop value of the iterative DO statement, the DO loop stops executing, and processing continues to the next DATA step statement.
After the 15th execution of the DO loop (corresponding to year=2004), the value of Year is incremented to 2005. Because 2005 exceeds the stop value of the iterative DO statement, the DO loop stops executing, and processing continues to the next DATA step statement.
Best,
Special offer for SAS Communities members
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.