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 (November 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 28 Nov 2006 15:44:16 -0800
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: OT: Chance to Make SAS-L History: Did You Know That...
In-Reply-To:   <JHEEIGIGFPGACEGDPJMGMECEICAA.bardos2@ansys.ch>
Content-Type:   text/plain; charset="us-ascii"

Sorry if this is a little simple minded, but that has never stopped me before... :)

A post today from the venerable Venky Chakravarthy reminded me of a quick way to extract every nth record from a large dataset, without reading the full file. This example extracts the 10,000th records from the Zipcode file, reading only the five pertinent records:

data sample; if 0 then set sashelp.zipcode nobs=_obs; do _i=1 to _obs by 1e4; set sashelp.zipcode point=_i; output; end; stop; run;

For a large file this is a quick way to extract a small evenly distributed subset. The point= and nobs= create temporary variables, so only the original columns are kept.

Paul Choate DDS Data Extraction (916) 654-2160


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