Date: Fri, 10 May 1996 19:56:09 -0400
Reply-To: "Richard P. Paugh" <paughr@MERCK.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Richard P. Paugh" <paughr@MERCK.COM>
Organization: Merck & Co., Inc.
Subject: Re: Data step programming problem - Help!
Use a Proc Freq to get the number of times the unique values of (school
number, serial number) occur. Send the output to a dataset. You can then
merge the new dataset back with the original to create a dataset that has
observations where its (school number, serial number) occur more than once.
In article <email@example.com> firstname.lastname@example.org (Tadd
Clayton) writes:>From: email@example.com (Tadd Clayton)
>Subject: Data step programming problem - Help!
>Date: 10 May 1996 03:00:14 GMT
>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
>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
>Thanks for any help.
>Tadd Clayton Ph: 64 9 373 7599 ext. 6451
>Research Officer Fax: 64 9 373 7486
>Department of Paediatrics Email: firstname.lastname@example.org
>School of Medicine
>University of Auckland
>Private Bag 92019
The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, Merck & Co., Inc. All responsibility for the statements
made in this Usenet posting resides solely and completely with the