Question
data Salary; set salaries; if find(upcase('job title'), 'LEAD')>0 or find(upcase('job title'), 'MANAGER')>0 or find(upcase('job title'), 'DIRECTOR')>0 then bonus=1500; else bonus=100.00; run; I am trying to
data Salary;
set salaries;
if find(upcase('job title'), 'LEAD')>0 or find(upcase('job title'), 'MANAGER')>0 or find(upcase('job title'), 'DIRECTOR')>0 then bonus=1500;
else bonus=100.00;
run;
I am trying to write an appropriate SAS code creating a "bonus" variable of $1,500.00 for employees who are leads, managers, or directors, and $100.00 otherwise. The variable within the dataset is "job title", and some example titles are "Engineering Director" or "Lead Engineer" rather than just straight forward "lead, manager, director". My code above returns all bonus values of $100.00, and none of $1,500.00. How can I correct?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started