Date: Fri, 2 Sep 2005 09:03:25 -0700
Reply-To: vincent.fayolle@GMAIL.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: vincent.fayolle@GMAIL.COM
Organization: http://groups.google.com
Subject: Re: call symput in a macro
In-Reply-To: <1125674880.221060.280260@o13g2000cwo.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
It doesn't work if the %global statement is after the creation of the
mv.
I can do it in two time,... it's not very nice... I'd prefered in one
time
%macro mpTest ;
data _null_ ;
set WORK.TEST ;
call symput("mvOBS" ,_n_) ;
end ;
%do i = 1 %to &mvOBS ;
%global mvSERVSAS&i ;
%end ;
data _null_ ;
set WORK.TEST ;
call symput("mvSERVSAS" !! left(put(_n_,3.)) , MAVAR ) ;
run ;
%mend ;
|