Date: Tue, 9 Jun 2009 07:00:29 -0400
Reply-To: "SUBSCRIBE SAS-L Joe H. Smith" <peesari.mahesh@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "SUBSCRIBE SAS-L Joe H. Smith" <peesari.mahesh@GMAIL.COM>
Subject: How to call values from a dataset directly into macro variable .
hi all;
How to pass values to the macro from a dataset....
%macro test(month=,part1=);
DATA &month;
SET Examples.final_aggrgtd ;
BY Lptno;
IF FIRST.Lptno =1 and put(oadcredt1,monyy7.)=&month;
run;
proc sql;
select * from test where part=&part1;
quit;
%mend test();
i have to pass values for &month variable from mar2001 to mar2008
and when it creates corresponding datasets from mar2001....mar2008,those
values from this datasets(mar2001..mar2008) have to be passed to &part1.
Please give me inputs for passing values from a dataset to directly into
macro variable.
Thanks In Advance.
|