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 (March 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 22 Mar 2003 18:57:09 +0000
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject:      Re: Limiting BY observations
Comments: To: kellermandavid@YAHOO.COM
Content-Type: text/plain; format=flowed


If printing the thing is a one-time operation, then I would create a view and then print from it. Of course, if you are planning on reading the by-castrated file considerably more than once thereafter, replace the view with a data file.

data to_print / view = to_print ; do _n_ = 1 by 1 until ( last . by_variable ) ; set input_sas_file ; by by_variable ; if _n_ <= 10 then output ; end ; run ;

proc print data = to_print ; run ;

Kind regards, ------------------- Paul M. Dorfman Jacksonville, FL -------------------

>From: David Kellerman <kellermandavid@YAHOO.COM> > >I want to print only the 1st 10 observations in each BY group. Any >suggestions.

_________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE*

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