Date: Wed, 21 Sep 2005 05:33:50 -0700
Reply-To: Ali G <Alistair.Gordon@NEWTYNE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ali G <Alistair.Gordon@NEWTYNE.COM>
Organization: http://groups.google.com
Subject: Re: Selecting last 10 rows from a dataset
Content-Type: text/plain; charset="iso-8859-1"
> in third line obs=n-i !! how does comipler finds the value of n, as we
> are creating variable 'n' in 4th line (set a nobs=n point=obs).
>
> In simple words, please let me know how it actually executes ??
>
Hi,
>From the SAS V8 on-line docs, under the description of the SET
statement:
-------------------------
NOBS=variable
creates and names a temporary variable whose value is usually the total
number of observations in the input data set or data sets. If more than
one data set is listed in the SET statement, NOBS= the total number of
observations in the data sets that are listed. The number of
observations includes those that are marked for deletion but are not
yet deleted. Restriction: For certain SAS views, SAS cannot determine
the number of observations. In these cases, SAS sets the value of the
NOBS= variable to the largest positive integer value that is available
in your operating environment.
Tip: At compilation time, SAS reads the descriptor portion of each data
set and assigns the value of the NOBS= variable automatically. Thus,
you can refer to the NOBS= variable before the SET statement. The
variable is available in the DATA step but is not added to any output
data set.
Interaction: The NOBS= and POINT= options are independent of each
other.
-------------------------
Does that tell you what you need to know?
|