Thank you for the reply. The imputation rules are:
If date part is not valid then replace it with last day of the month in the given date. For example, ukfeb2022 has invalid date part 'uk' and month is feb and year 2022 is not a leap year I should get it as 28FEB2022.
If both date part and month part are not valid then it should be 31DEC for example xyunk2019 has invalid date part xy and invalid month part unk and hence it should be 31DEC2019.
For the first part, I have used the following and it is working:
imputed_date = put(intnx('mon',input(cats('01',date_monthpart,date_yearpart),date9.),0,'e'),$date9.);
... View more