Date: Mon, 6 Dec 2010 09:31:36 -0500
Reply-To: Nat Wooding <nathani@VERIZON.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <nathani@VERIZON.NET>
Subject: Re: Regarding _Data_
In-Reply-To: <AANLkTi=KgKsvqedFtucHEQqsKN7wAEZLhirpwy6niUk4@mail.gmail.com>
Content-Type: text/plain; charset="US-ASCII"
Null
The sort example is in my eyes, more useful than the data step. One could
then reference the new sorted data set by specifying _last_.
Nat
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Data
_null_;
Sent: Monday, December 06, 2010 9:22 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Regarding _Data_
On Mon, Dec 6, 2010 at 8:13 AM, Nat Wooding <nathani@verizon.net> wrote:
> The usefulness of this trick is a bit debatable.
Indeed as illustrate by this data step.
27 data _data_ _data_;
28 set sashelp.class;
29 if sex = 'M' then output _data_;
30 else output _data_;
31 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.DATA9 has 19 observations and 5 variables.
NOTE: The data set WORK.DATA10 has 0 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
This example using PROC SORT is better. Here omitting OUT would sort
SASHELP.CLASS in place and you can't write OUT=;
32
33 proc sort data=sashelp.class out=_data_;
34 by sex;
35 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.DATA11 has 19 observations and 5 variables.
>
> Nat
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
vaibhav
> wadhera
> Sent: Monday, December 06, 2010 8:17 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Re: Regarding _Data_
>
> Thanks Nat & Null.
>
> But i am still not sure what did actually happen using this.
>
>
> On Mon, Dec 6, 2010 at 6:38 PM, Nat Wooding <nathani@verizon.net> wrote:
>
>> Hi Vaibhav
>>
>> I think that _null_ answered your question. I did look for _data_ in the
>> documentation and other than a statement saying to not use it as a data
> set
>> name (this statement also included _last_ and _null_ ), my quick search
> did
>> not locate that actual page where it is documented.
>>
>> Nat
>>
>>
>> -----Original Message-----
>> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>> vaibhav
>> wadhera
>> Sent: Monday, December 06, 2010 7:52 AM
>> To: SAS-L@LISTSERV.UGA.EDU
>> Subject: Re: Regarding _Data_
>>
>> Hi Nat
>>
>> Like you have said in your mail that _error_ is like a keyword and we all
>> know what is the significance of the same. What i am asking is that is
>> there
>> any significance attached to _data_ like variable in SAS.
>>
>> Thanks & Regards
>> Vaibhav Wadhera
>>
>> On Mon, Dec 6, 2010 at 6:18 PM, Nat Wooding <nathani@verizon.net> wrote:
>>
>> > Vaibhav
>> >
>> > SAS uses words with leading and trailing underscores to identify
>> "special"
>> > variables that the system creates such as _ERROR_ which indicates
> whether
>> > there was an error during the execution of a data step. However, I'm
not
>> > sure that this is what you mean.
>> >
>> > Could you say a little more about what you are asking and please reply
> to
>> > the list and not to me alone.
>> >
>> > Nat Wooding
>> >
>> > -----Original Message-----
>> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
>> > vaibhav
>> > wadhera
>> > Sent: Monday, December 06, 2010 4:11 AM
>> > To: SAS-L@LISTSERV.UGA.EDU
>> > Subject: Regarding _Data_
>> >
>> > Hi
>> >
>> > I would like to ask whether there is any thing of the sort _data_ in
> SAS.
>> >
>> > --
>> > Thanks & Regards
>> >
>> > Vaibhav wadhera
>> >
>>
>>
>>
>> --
>> Thanks & Regards
>>
>> Vaibhav wadhera
>>
>
>
>
> --
> Thanks & Regards
>
> Vaibhav wadhera
>