You want payment day on day PD of the month. If the month is too short to have day PD, then use end-of-month:
data have;
input account_id reporting_date payment_day;
informat reporting_date date9.;
payment_date= min(intnx('month',reporting_date,-1,'end')+payment_day
,intnx('month',reporting_date,0,'end'));
format reporting_date payment_date date9.;
cards;
1000 31JAN2017 31
1000 28FEB2017 31
1000 31MAR2017 31
1000 30APR2017 31
1000 31MAY2017 31
2000 31JAN2017 30
2000 28FEB2017 30
2000 31MAR2017 30
2000 30APR2017 30
;
run;
... View more