data a;
input time $ wj $ yj $ ;cards;
10Q4 ht.wj_10Q4 ht.yj_10Q4
10Q3 ht.wj_10Q3 ht.yj_10Q3
.......
07Q1 ht.wj_07Q1 ht.yj_07Q1
;
run;
data a2;
set a;
num=_n_;
run;
if max num is n then
%global par1 par2 par3;
%let par1=;
%let par2=;
%let par3=;
%macro get_par(count=);
proc sql;
select time, wj, yj into :par1, :par2, :par3
from a2
where num=&count;
quit;
%mend;
%macro rerun(total=);
%do i=1 % to $total;
%get_par(count=&i);
%mypaid(time=&par1;,data1=&par2,data2=&par3) ;
%end;
%Mend;
%re_run(total=n);
|