Hello all, Need help with this class assignment for students which does not work properly. Here is the SAS code: /* example 1 */
data merge1;
input ID $ SEX $ BDATE SALARY NAME $ ;
informat BDATE mmddyy8. ;
format BDATE mmddyy8. ;
datalines;
1 M 10/21/46 70000 ivan
2 F 11/01/55 68000 judy
7 M 01/27/59 47000 ralph
;
run;
data merge2;
input ID $ SEX $ BDATE SALARY TAXRATE WITHHOLD NAME $ ;
informat BDATE mmddyy8. ;
format BDATE mmddyy8. ;
datalines;
3 F 01/01/33 78000 .36 23000 zoe
5 M 03/07/29 37000 .25 9000 marco
;
run;
data merge3;
input ID $ SEX $ BDATE SALARY HEIGHT WEIGHT NAME $ ;
informat BDATE mmddyy8. ;
format BDATE mmddyy8. ;
datalines;
4 M 10/23/49 65000 68 158 roger
6 F 07/04/65 55000 74 202 clara
;
run;
data all (keep= ID BDATE SALARY NAME rename=(NAME=NAME1)) ;
set merge1 merge2 merge3 ;
where BDATE <= 01/01/60 and SALARY GE 50000 ;
format BDATE mmddyy8. ;
run;
proc print ;
run; This is our output: The problem is that it does not select ID 3 zoe from the dataset merge2. Any ideas? Best, Alen
... View more