LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2001, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 31 Jan 2001 12:43:43 -0500
Reply-To:     "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Subject:      Re: Ensure Not Two id's in the same category of variable EXCAT
Comments: cc: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Content-Type: text/plain; charset="iso-8859-1"

Gerhard,

I think Peter put in "if not ( first.icf and last.icf )" to take care of instances where only one EXCAT per ICF exist. In such cases, the first.icf and last.icf will both equal 1, and thus the statement is needed to prevent the output of these cases to the 'trouble' dataset.

Regards

Venky

-----Original Message----- From: Gerhard Hellriegel [mailto:ghellrieg@T-ONLINE.DE] Sent: Wednesday, January 31, 2001 12:16 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Ensure Not Two id's in the same category of variable EXCAT

On Wed, 31 Jan 2001 15:38:25 +0000, Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK> wrote:

>mark.k.moran@CENSUS.GOV writes >>In SAS 6.12, I have a large dataset that has a record identifier called >>ICF. One of the variables is called EXCAT. I need to make sure that no >>ICF shows up twice in the same EXCAT, or else capture only those records >>violating that. Proc Freq alone will not do this. What is the most >>sensible way to do this? In this case, I prefer to use Data Steps and/or >>Procs. >> >>Mark > >Can you sort this large data set (perhaps it is indexed already) ? >Proc sort data=large.dataset out=large; > by EXCAT ICF ; >run; >data large.goodata trouble; > set large; > by EXCAT ICF ; > if first.icf then output large.goodata; > if not ( first.icf and last.icf ) then output trouble; >run; > >This provides a file to check for doubtful cases. Variables other than >the key variables, may differ within the same ICF, so having all trouble >together seems best. >-- >Peter Crawford

Hi Peter, I think its enogh to test for first.icf ...(??)


Back to: Top of message | Previous page | Main SAS-L page