Date: Wed, 18 Feb 2004 14:46:52 +0530
Reply-To: Arunk@DELHI.TCS.CO.IN
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arun X Kumar <Arunk@DELHI.TCS.CO.IN>
Subject: Re: Resolving Macro variable in Cards Stmt!
Content-Type: text/plain; charset="us-ascii"
Easwar,
Cards or datalines are not used inside a macro. See if the logic below
solves your problem.....
%let a=Year;
%macro eas;
Data one;
empid="&a.2004";output;
empid="&a.2003";output;
empid="&a.2002";output;
;
run;
%mend;
%eas;
Thanks and Regards
Arun Kumar
Easwara Moorthy <easwar_ps@YAHOO.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
02/18/2004 01:31 PM
Please respond to Easwara Moorthy
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: Resolving Macro variable in Cards Stmt!
Hi All...
I need to resolve a Macro variable in a Data step.How can i do that!?
I'll be Happy if i get a solution!
Requirement
-----------
%let a='Year';
........
........
........
%macro eas;
Data one;
input empid;
datalines;
&a2004
&a2003
&a2002
;
run;
%mend;
%eas;
expected result:
----------------
Year2004
Year2003
Year2002
Thanks in Aadvance!
Easwar!