hello,
i just want to bring to your attention a program for building the format which can be easily put in a macro with two parameters start and end:
filename test "your_location\format.txt";
data _null_;
file test;
start='01jan09'd;
end=mdy(month(date()),1,year(date()));
dif=intck('month',start,end);
do i=1 to dif;
if i=1 then put "proc format;" /
"value monfmt" "'" start date7. +(-0) "'d='" start date7. "'";
else do;
b=intnx('month',start,1,'same');
put "'" b date7. +(-0) "'d='" b date7. "'";
start=b;
end;
if i=dif then put ";run;";
end;
run;
%include "your_location\format.txt";
Marius