data _caldates; set _caldates;
n+1;
if intnx('month',beg_date,0,'e')=
intnx('month',"&mindate"d,0,'e') then call symput ('start',n);
if intnx('month',end_date,0,'e')=
intnx('month',"&maxdate"d,0,'e') then call symput ('finish',n);
run;
%do j=&start %to &finish %by &step;
data _null_; set _caldates (sortedby=n where=(n=&j));
call symput ('beg',beg_date);
run;
data _null_; set _caldates (sortedby=n where=(n=&j));
call symput ('end',end_date);
run;
data _sample/view=_sample;
do k=1 by 1 until (last.permno);
set _vol; by permno;
where &beg<=date<&end;
if missing(ret) then continue;
mcount=sum(mcount,1);
end;
keep permno mcount;
run;
这段程序为什么用call symput 定义的 start finish beg和end好像不工作那?谢谢各位帮助