Try this
data want;
first = '01jan2019'd;
do while (1);
last = intnx('month', first, 0, 'e');
if last > today() then leave;
output;
first = last + 1;
end;
format first last ddmmyy10.;
run;
CLICK HERE to find out more related problems solutions.