What I suspected. You don't have dates, you have strings that look like dates. Do this:
month = month(input(Date,monyy7.));
year = year(input(Date,monyy7.));
Or, even better, read the data as dates when it arrives in SAS; how you do this depends on the type of data source.
... View more