The following program works for a single month.
data libname.outputdata;
set libname.inputdata (keep=tdate);
if month(tdate) in (01,02,03,04,05,06,07,08,09,10,11,12) then all_mon_trans=1;
else no_trans=1;
select(MONTH(tdate));
when(01)
current_mon_trans=1;
when(12)...