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 (May 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 7 May 2001 20:30:22 -0400
Reply-To:     dputnam@MERKLENET.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Darryl Putnam <dputnam@MERKLENET.COM>
Subject:      Re: Randomly pick
Comments: To: brian-vuong@USA.NET
Content-Type: text/plain; charset="iso-8859-1"

You are making things too hard Try this

data select;

set auditing.recaudit; rand=ranuni(8); run; proc sort data=select; by rand; run; data FinalData; set select (obs=5000); run;

-----Original Message----- From: Brian Vuong [mailto:brian-vuong@USA.NET] Sent: Monday, May 07, 2001 5:56 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Randomly pick

Dear SAS users: Please help me with random generator. After I ran codes listed below to randomly pick 5000 records. I later found that in those 5000 records consists of duplicates. Please show me to randomly pick 5000 records without duplicates.

data select; do i=1 to 400; j= (ranuni(0)*total); set auditing.recaudit point=j nobs=total; output; end ; stop; run;

Any help is greatly appreciated.

Regards,

Brian Vuong


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