Paige raises some good questions. How does one get multiple years of birth? Also, the problem specification does seem to be a little lacking.
But if we are to select for either of the conditions which Paige enumerates, we can do so quite easily. If it is the first condition that we want to select data for (that the years 2000, 2001, and 2002 are all represented among the variables YOB_1, YOB_2, and YOB_3), then one could select those records (for a data step or within a procedure) by using the following WHERE statement:
where std(yob_1,yob_2,yob_3)=std(2001,2002,2003);
If it is desired to select persons who have nonmissing data for every variable YOB_1 through YOB_3, then the above WHERE statement could be replaced with
where nmiss(yob_1,yob_2,yob_3)=0;
... View more