Date: Mon, 7 May 2007 14:54:37 -0400
Reply-To: souga soga <souga1234@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: souga soga <souga1234@GMAIL.COM>
Subject: Re: @ sign in a data step.
In-Reply-To: <2C6B65AAC3623140922DE580669C456A0154A562@LTA3VS001.ees.hhs.gov>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Thanks, but how is this different from an efficiency standpoint than doing
an implicit read. i.e.
DATA X;
set ReadOnlyBdata
(where = (Id eq "B"));
run;
Thanks again,
Sa
On 5/7/07, Fehd, Ronald J. (CDC/CCHIS/NCPHI) <rjf2@cdc.gov> wrote:
>
> > From: souga soga
> > I have written a program which conditionally reads raw data
> > and it works well.Now i have the same data raw is a dataset ,
> > but i am not sure how to read the data efficiently from a
> > dataset i.e using the @ sign so that i do not have to read
> > every variable into the PDV and then subset the data.
>
> your original program did a subset on Id eq 'B'
>
> DATA* ReadOnlyBdata;
> INPUT Id $ *1*-*1* @;
> IF Id="B" THEN DO;
> INPUT Id $ *1*-*1* Id1 $ *3*-*6* Id_st $ *8*-*9* Id_Na $ *11*-*12*;
> OUTPUT;
> END;
>
> this is redundant, but illustrates the data set where option that
> answers your Q
>
> DATA X;
> do until(EndoFile);
> set ReadOnlyBdata
> (where = (Id eq "B"))
> end = EndoFile;
> output;
> end;
> stop;
> run;
>
> Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov
>
|