|
I would think that a DROP or KEEP dataset option would be of use.
data theview(KEEP=NEWVAR1 ) /view=theview;
set base;
newvar1 = oldvar1*10;
ONLY the variables stated in the Keep will reside in the dataset or view.
> -----Original Message-----
> From: Nigel Tufnel [SMTP:dousk8@HOTMAIL.COM]
> Sent: Wednesday, July 11, 2001 8:46 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Dynamic View
>
> We use a standard data step view for most of our analysis. The base data
> set (from which the view is created) has about 100 columns and the view
> generates about 100 additional columns. Running proc's against the view
> can
> take considerablly longer than running against the base sas data set.
> Most
> of the time, however, I'm forced to use the view because the column that I
> need is not in the base data set. Sample code for the view looks like:
>
> data theview/view=theview;
> set base;
> newvar1 = oldvar1*10;
> newvar2 = put(oldvar1,fmt1.);
> newvar3 = ............
> etc......
> run;
>
> Anyway, I'd like the view to generate only the variables in which I am
> interested in using. For example, if I need only newvar1, I'd like the
> view
> to generate only newvar1 (and not newvar2, etc.) I can probably think of
> a
> kludgy way to do this that would likely clutter up the view code a lot.
> Is
> there any cool way to generate only the variables I want?
>
> Thanks,
> Nigel
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
|