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 (August 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 15 Aug 2002 13:41:12 -0400
Reply-To:     Mike Fay <rmf4@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Fay <rmf4@CDC.GOV>
Subject:      Just get unique records or counts?

(please ignore previous post; I accidentally tabbed to Send)

Hi folks,

I have several situations where I have a lot of duplication in records and want to know e.g. how many different (unique) values are found in Field3. For example, what states does a list of 1,000 students come from; are all 50 represented?

The easiest that I, as a newbie, have been able to get to this is to use e.g.:

proc freq data=hazdat.assess noprint; tables dSiteID/list out=work.Assess_NPL0; run;

and then the Log shows a record count (if I want a count of the unique values) and the OUT= file shows the actual value (but has a few other things).

Is there some other way to just get a count and/or just output the unique values in e.g. a Data statement? I thought I once saw a Unique qualifier that could be used in this regard, but can't seem to tease a related use out of Help now.

This is a minor question, since I can get what I want... but I have a feeling I am missing some capability etc. This would be typical :)

TIA,

Mike


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