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 (September 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 7 Sep 2006 07:36:06 -0700
Reply-To:     BK <byronkirby@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         BK <byronkirby@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Defining macro variable with another variable?
Comments: To: sas-l@uga.edu
In-Reply-To:  <1157637529.745542.225480@b28g2000cwb.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

Papu, your mixing your languages... did you need these to end up in a data step? like as "set" statement parameters, if so see bottom portion of code. Byron /******************************************************/

%let proc_dt1 = 200507; %let proc_dt2 = 200508; %let proc_dt3 = 200509; %let proc_dt4 = 200510;

%put &proc_dt1; %put &proc_dt2; %put &proc_dt3; %put &proc_dt4;

%let proc_dt = proc_dt; %put &proc_dt;

%macro lp; %put &proc_dt1; /*was "&proc_dt10" a mistake? that var hasn't been defined*/ %do k = 1 %to 4; %put &&proc_dt&k; %end; %mend; %LP;

/*********************** assume a libname ds and datasets prefixed with Tyyyymm ***********************/

%macro lp; %do k = 1 %to 4; Ds.T&&proc_dt&k; %end; %mend;

data FourMonths; set %LP; run;


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