Date: Thu, 25 Feb 2010 01:07:47 -0500
Reply-To: Clark An <kuhasu@126.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Clark An <kuhasu@126.COM>
Subject: Re: Data step Do loop to change the value of Macro Variable
1.e.g.
Thank you for the solution.
data mat2345;
array x[2,3,4,5] x1-x120;
retain n 0;
do i=1 to 2;
do j=1 to 3;
do k=1 to 4;
do l=1 to 5;
n+1;
...
x[i,j,k,l]=lag&n.(n);
output;
end;
end;
end;
end;
run;
If array can help me identify a variable easily,then how to treat lag
function with macro variable?
2.What I want to do/get:
1)generate a series of variables.
2)put the value of a variable to macro varibles which can be used in new
created varible's name.
3)lag&n.(x) in a loop without %do loop
|