Hello,
I have dataset list below.
data have;
infile datalines dsd;
format ID 2. first_name $10. last_name $10. birthdate mmddyy10. enroll $1.;
input ID : 2. first_name : $10. last_name : $10. birthdate : mmddyy10. enroll : $1.;
datalines;
1, John, Doe, 01/01/2020, Y,
12, John, Doe, 01/01/2020, N,
2, Joe, Smith, 12/01/2019, Y,
22, Joe, Smith, 12/01/2019, Y,
27, Joe, Smith, 12/01/2019, Y,
32, Kevin, Mao, 02/06/2000, N,
36, Kevin, Yao, 02/06/2000, Y,
24, Beky, Lee, 08/23/2005, N,
41, Beky, Lee, 08/21/2005, N,
48, Beky, Lee, 08/23/2005, N,
49, Beky, Lee, 08/23/2005, Y,
15, Ashley, Taylor, 09/18/2000, N,
54, Ashley, Taylor, 09/18/2000, N,
65, Ashley, Taylor, 09/18/2000, N,
;
run;
I would like to list all the unmatching names/dob/enroll as the result shown below. Please advice how to approach it, thanks.
data want;
infile datalines dsd;
format ID 2. first_name $10. last_name $10. birthdate mmddyy10. enroll $1.;
input ID : 2. first_name : $10. last_name : $10. birthdate : mmddyy10. enroll : $1.;
datalines;
1, John, Doe, 01/01/2020, Y,
12, John, Doe, 01/01/2020, N,
27, Joe, Smith, 12/01/2019, Y,
32, Kevin, Mao, 02/06/2000, N,
36, Kevin, Yao, 02/06/2000, Y,
24, Beky, Lee, 08/23/2005, N,
41, Beky, Lee, 08/21/2005, N,
48, Beky, Lee, 08/23/2005, N,
49, Beky, Lee, 08/23/2005, Y,
;
run;
... View more