LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 12 Jul 2001 10:13:11 -0400
Reply-To:   "Braten, Michael (Exchange)" <mbraten@BEAR.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Braten, Michael (Exchange)" <mbraten@BEAR.COM>
Subject:   Re: Dynamic View
Comments:   To: Nigel Tufnel <dousk8@HOTMAIL.COM>
Content-Type:   text/plain

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. ***********************************************************************


Back to: Top of message | Previous page | Main SAS-L page