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 (September 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Sep 2005 06:59:22 -0700
Reply-To:     frank_diiorio@YAHOO.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Frank DiIorio <frank_diiorio@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Re: Selecting last 10 rows from a dataset
Comments: To: sas-l@uga.edu
In-Reply-To:  <1127292530.019353.173880@o13g2000cwo.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

Ali has already shown this is a one-step solution. What I'd add to his code is a check to ensure that the program correctly handles cases where the input dataset has fewer than 10 observations. This is shown below:

data b; do i = n-9 to n; if i > 0 then do; set a nobs=n point=i; output; end; end; stop; run;


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