Date: Mon, 16 Mar 2009 15:10:04 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: what does the call symput do below,
specifically the argument 'var'||left(n) and 'typ'||left(n)
Content-Type: text/plain; charset="iso-8859-1"
It looks like someone is naming macro variables var1 typ1 and so forth for each observation in the data set.
If they have that many macro variables, they are probably approaching the problem wrong and putting
data in a data set could be used rather than creating a ton of macro variables.
-Mary
----- Original Message -----
From: barry.brian.barrios@GMAIL.COM
To: SAS-L@LISTSERV.UGA.EDU
Sent: Monday, March 16, 2009 2:50 PM
Subject: what does the call symput do below, specifically the argument 'var'||left(n) and 'typ'||left(n)
data _null_;
set est end=eof;
what does the call symput do below, specifically the argument 'var'||
left(n) and 'typ'||left(n)?
if _name_ ne ' ' then do;
n+1;
call symput('var'||left(n),_name_);
call symput('typ'||left(n),_type_);
end;
if eof then
call symput('n',n);
run;
|