/*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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.