由买买提看人间百态

topics

全部话题 - 话题: gennum12
(共0页)
p***h
发帖数: 1462
1
来自主题: Database版 - Help! A SAS/Macro question. Thanks!
Please simplify the following program by macro statement. Thanks.
%let gennum12=378;
%let gendte12="06jul2001"d;
*******
*******;
data _null_;
x=mdy(month(&gendte12-28),01,year(&gendte12-28));
y=x+
mod(((6-weekday(x))>=0)*(6-weekday(x))+((6-weekday(x))<0)*(7+6-weekday(x)),7);
call symput('gennum11',put(&gennum12-(&gendte12-y)/7,z3.));
call symput('gendte11','"'!!put(y,date9.)!!'"d');
run;
da
(共0页)