Here are some additional explanations and modified code.
SAS basically uses the form "variable=value to be assigned;" when assigning a value to a variable.
In the following, the assignment is correct, but the semicolon at the end of the statement is missing.
Salary=256000.45
The error message is missing the semicolon at the end of the statement, so the next line is considered a single statement, and you see a keyword in the error message that connects Salary to 256000.45 as "expecting one of the following: !, !!, &, *, **, +, -,...".
Salary=256000.45 Salary *0.0565 ;
Also, the following does not match the syntax "variable=value to be assigned;" which is problematic.
Salary *0.0565 ;
Therefore, the following needs to be corrected
Salary=Salary*0.0565 ;
However, you said " by increasing salary by 5.65% ". So I think the following should be written here
Salary=Salary+Salary*0.0565 ;
Note that the following statement is "sum statement", which is a special statement to calculate the sum between obs, so there is no syntax problem.
Year + 1;
I suggest this code.
data results.salary2;
set cert.salary1;
do until (salary>=500000);
Salary = Salary + Salary * 0.0565 ;
Year + 1;
end;
run;
... View more