The question is.... 1. Create 2 DATA set named employee_data1 and employee_data2. Each data contains 4 variables – Gender, educ, Jobcat & Salary . employee_data1 store only MALE obs having Educ ranges from 12 to 15 and jobcat must be 1 AND employee_data2 store only FEMALE obs having Educ ranges from 8 to 12 , jobcat must be 1 and salary > $10,000 The data of Excel file is...... The problem Iam having is Iam unable to add salaries corresponding to males and females... The problem I think is due to the dollar sign and comma in the salary variable. I tried to convert these character variable to numeric variable by using input statement as shown below.... but still I am getting errors.. data employee_data1 employee_data2; set Employee1( keep= gender educ jobcat salary); input( salary, dollar7.); if ( gender='m' AND Educ IN( 12 13 14 15) AND jobcat=1) then output bittu.employee_data1; if ( gender='f' AND Educ IN( 8 9 10 11 12) AND jobcat=1 AND salary > 10,000 ) then output bittu.employee_data2; run; proc print; run;
... View more