|
|
沙发

楼主 |
发表于 2010-6-4 00:11:26
|
只看该作者
Re: 请教
[code:2ga41rf3]data a;
do open_date = '01jan2007'd to '01jan2009'd;
cust_id = put(round(1000*ranuni(1), 1e2), z4.);
output;
end;
format open_date date11.;
run;
%macro out(ss);
data &ss;
set a(where =( 's'||put(year(open_date), 4.)||put(month(open_date),z2.) = "&ss"));
%mend out;
proc sql;
create table aa as
select distinct 's'||put(year(open_date), 4.)||put(month(open_date),z2.) as y
from a where not missing(open_date);
quit;
data _null_;
set aa;
call execute('%out('|| y||')'); run;
run;[/code:2ga41rf3]
程序的效率有点问题 JingJu。 |
|