|
Hi everyone
I have a data set in which each observation should be uniquely
identified by a combination of two variables - a school number
and a serial number within each school. However, due to problems
with the data entry process, there are a number of observations
with duplicate values for the combination of school and serial
numbers.
I would like to be able to compare the school and serial numbers
for each observation with those from the previous observation and
then output *both* observations to a data set if they are
duplicated. I can use a retain statement to define variables
that will carry the school and serial numbers over iterations of
the data step to allow the comparison but, as SAS appears to work
on an observation by observation basis only, I can't figure out
how to output both observations. Can anyone offer a simple
solution?
Thanks for any help.
Tadd
--
Tadd Clayton Ph: 64 9 373 7599 ext. 6451
Research Officer Fax: 64 9 373 7486
Department of Paediatrics Email: t.clayton@auckland.ac.nz
School of Medicine
University of Auckland
Private Bag 92019
Auckland
NEW ZEALAND
|