Don't overcomplicate things:
data _null_;
c_mth = intnx('month',today(),-1));
call symputx('RMTH',put(c_mth,,monname3.));
call symputx('REP_MTH',lowcase(put(c_mth,monyy7.)));
call symputx('ACT_MTH',lowcase(put(c_mnth,monname3.))!!PUT(c_mth,year2.));
call symputx('PERIOD',put(c_mth,yymmddn6.));
call symputx('RUN_DAYS',put(day(intnx('month',c_mth,0,'e')),z2.));
run;
CALL SYMPUTX will automatically strip the second argument.
INTNX with a third argument of 0 will result in the same value ("beginning" alignment).
... View more