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 (July 2003, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 29 Jul 2003 19:22:22 -0400
Reply-To:     Jonathan Siegel <jmsiegel@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jonathan Siegel <jmsiegel@YAHOO.COM>
Subject:      Re: Count distinct in sas
Comments: To: jesus.garcia@DUNNHUMBY.COM

How about a proc sort with the NODUPKEY option to get the distinct values. The value you want would then just be the number of records in the output dataset. And you could get this without an additional data pass by manipulating SET to ony read the dataset header.

data _null_; if 1 = 0 then set sorteddata point=i nobs=n; call symput('n', n); stop; run;

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