/*anyone making more than $99,999 a 2% raise, anyone making more than $49,999 to (including) $99,999 a 3% raise,
anyone making more than $29,999 to (including) $49,999 a 4% raise, and everyone else gets a 5% rais*/
data midterm.activeemployee;
set midterm.employee1;
if (salary >99999) then salary+salary *.02 ;
else if (salary >(49999<salary<=99999))then salary+ salary*.03;
else if (salary >(29999<salary<=49999))then salary+salary *.04 ;
else if (salary<=29999 ) then salary+salary *.05;
run;
you need to adjust to be salary=salary*(1+raise);
data midterm.activeemployee;
set midterm.employee1;
if salary >99999 then salary=salary*1.02 ;
else if 49999<salary<=99999 then salary=salary*1.03;
else if 29999<salary<=49999 then salary=salary*1.04 ;
else if salary<=29999 then salary=salary*1.05;
run;
-unison
you need to adjust to be salary=salary*(1+raise);
data midterm.activeemployee;
set midterm.employee1;
if salary >99999 then salary=salary*1.02 ;
else if 49999<salary<=99999 then salary=salary*1.03;
else if 29999<salary<=49999 then salary=salary*1.04 ;
else if salary<=29999 then salary=salary*1.05;
run;
-unison
thank you, it worked.
perfect!
And to see the joyous benefit of being on the low end of one of these scales provide input for two employees with incomes of 29999 and 30000 and see the result.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.