LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 Nov 2010 01:19:35 -0500
Reply-To:     Søren Lassen <s.lassen@POST.TELE.DK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Søren Lassen <s.lassen@POST.TELE.DK>
Subject:      Re: what's wrong, only 5 observations
Comments: To: Bbser 2009 <bbser2009@GMAIL.COM>
Content-Type: text/plain; charset=ISO-8859-1

Max, What you should expect is 42 observations, read in two iterations of the data step (unless the dataset you read has a variable called I, which may change the number of iterations in the loop for each iteration of the data step).

If there is not an I variable on your input dataset, you should get two series of I values, each of them going 1,3,5...41. I cannot understand why you are getting only 5 observations out, my best guess is that you have set the option OBS=5. Try submitting "OPTIONS OBS=MAX;" and then the rest of your code - my guess is that you will now get 42 observations.

Regards, Søren

On Mon, 8 Nov 2010 21:31:05 -0500, bbser2009 <bbser2009@GMAIL.COM> wrote:

>I accidently wrote down a strange but grammatically right code like this: > >data temp; > > do i=1 to 42 by 2; > > set sasuser.actlevel; > > output; > > end; > >run; > >proc print; > >run; > > > >The data set being read has 42 observations. I supposed the code gave me 21 >observations. >But it turned out I only got the first 5 observations from the original data >set. > >Could you help me explain this results. Thanks. > >Max


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