Date: Sat, 18 Jun 2011 23:31:55 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: number of observations of this data set: sashelp.PRDSAL2
In-Reply-To: <000001cc2e38$3866cfd0$a9346f70$@com>
Content-Type: text/plain; charset=ISO-8859-1
Might try testing the value of NOBS. NOBS does not always accurately
reflect the number of observations in a dataset. Not sure if it would error
though if you tried a point value that was over the real record count,
though. In general I'd look at the various variable values with PUT
statements and see what's going on that way.
-Joe
On Sat, Jun 18, 2011 at 11:20 PM, bbser 2009 <bbser2009@gmail.com> wrote:
> Greetings.
>
> The first block below shows PRDSAL2 has 1500 observations.
> But the second and third blocks show that the number of observations should
> be 23040.
> Anyone knows what's going on here? Thanks a lot for any comments.
>
> BTW, I am using Learning Edition 4.1.
>
> Max
> (Maaxx)
> ====================================
> 9600 proc sort data=sashelp.PRDSAL2 out=xx;
> 9601 by predict;
> 9602 run;
>
> NOTE: There were 1500 observations read from the data set SASHELP.PRDSAL2.
> NOTE: SAS sort was used.
> NOTE: The data set WORK.XX has 1500 observations and 11 variables.
> NOTE: PROCEDURE SORT used (Total process time):
> real time 0.01 seconds
> cpu time 0.02 seconds
>
>
> 9603 data ex(drop=n);
> 9604 do until(n=100);
> 9605 do _point=1 to _nobs;
> 9606 set sashelp.prdsal2 nobs=_nobs point=_point;
> 9607 output;
> 9608 end;
> 9609 n+1;
> 9610 end;
> 9611 stop;
> 9612 run;
>
> NOTE: The data set WORK.EX has 2304000 observations and 11 variables.
> NOTE: DATA statement used (Total process time):
> real time 47.71 seconds
> cpu time 3.70 seconds
>
>
> 9613 data exx(drop=n);
> 9614 do until(n=10);
> 9615 do _point=1 to _nobs;
> 9616 set sashelp.prdsal2 nobs=_nobs point=_point;
> 9617 output;
> 9618 end;
> 9619 n+1;
> 9620 end;
> 9621 stop;
> 9622 run;
>
> NOTE: The data set WORK.EXX has 230400 observations and 11 variables.
> NOTE: DATA statement used (Total process time):
> real time 3.32 seconds
> cpu time 0.54 seconds
>
|