Date: Tue, 1 Nov 2005 19:08:24 -0800
Reply-To: satya <satyaanam@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: satya <satyaanam@HOTMAIL.COM>
Subject: complement of a macro variable
Content-Type: text/plain; charset="iso-8859-1"
here is my problem for today.
i have a macro variable that list some variables:
%let varlist=c_d_sex c_d_wei1 c_d_wei2 c_d_age1 c_d_age2 c_d_age3;
and a corresponding macroavr that list a part of it, say;
%let varpart=c_d_wei1 c_d_wei2;
i want to create a third macrovar, corresponding to varlist, in which
each single string of the complement to varpart has a different prefix
(b instead of c) that is:
varlist1=b_d_sex c_d_wei1 c_d_wei2 b_d_age1 b_d_age2 b_d_age3
Here is important to have the same order of varlist: i will use this
macrovar to define an array in a subsequent data step and has to match
to another similar defined array.
Thanks in advance for any help
ps i would also appreciate some links to resources, if any, that
teaches this kind of management with macro variables