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
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
|