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 (October 2006, 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 Oct 2006 09:02:20 -0700
Reply-To:     monal kohli <k_monal_99@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         monal kohli <k_monal_99@YAHOO.COM>
Subject:      Re: macro variable?
Comments: To: bhargav.desai@GMAIL.COM
In-Reply-To:  <1160666850.085999.57390@k70g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=iso-8859-1

%let value =i;(value from ur script);

%macro keepvars; %if &value eq j %then %do; data x; set x(keep=var2 var3); run; %end; %else %do; %if &value eq i %then %do; data x; set x(keep=var1 var2); run; %end; %end;

%mend;

HTH Mona --- bhargav.desai@GMAIL.COM wrote:

> Hello! > > > > I have a datastep wtih KEEP statment. What I want > to do is keep two > variables, var1 and var2 when certain value say i, > is passed from Unix > script. If value passed is J then i need to keep > var2 and var3. If > no value is passed, then I want to keep all four > variables. > > How can I do that? > > Thanks >

__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


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