Maxim 28 ... do not format macro variables for the purpose of performing arithmetic or logical operations.
%let score_month = 201910;
%let mon_var = %sysfunc(inputn(&score_month,yymmn6.)); /* Not formatted */
%let last_mon = %sysfunc(intnx(month,&mon_var,-1)); /* Not formatted */
%put &=score_month &=last_mon;
Now to see what the integer in &last_mon represents, so humans can understand it, formatting is appropriate.
%put %sysfunc(putn(&last_mon,yymmn6.));
... View more