assuming a library ref CLAU holding these monthly files, named like BRATES0601 BRATES0602 .... BRATES0812 this code will extract tables:
1 Borrid, earliest_time, latest_time
2 Borrid, missing_time[pre]
libname user ( work clau ) ;
data t_range( keep= Borrid earliest_time latest_time )
t_missed( keep= Borrid missing_time ) ;
last_time = 0 ;
do until( last.borrid ) ;
set BRATES0601 BRATES0602 .... BRATES0812 ;
* until you SAS9.2 you need to list every input table on SET statement
in SAS9.2 you could use a dataset list like BRATES0: ;
by Borrid ; * and assuming in timeKey order ;
missing_time = intnx( 'month', last_time, 1, 'ending' ) ;
if first.borrid then earliest_time = time_key ;
else
do while( missing_time LT timeKey ) ;
output t_missed ;
missing_time = intnx( 'month', missing_time, 1, 'ending' ) ;
end ;
last_time = timeKey ;
end ;
latest_time = timeKey ;
output t_range ;
run ;[/pre]Then you have a complete list of missing TimeKeys for each borrower, except those which are missing at start or end of the whole range. I wasn't sure if your records were limited to borrowers "present" throughout the date range. If you need those late starters and early finishers, you can pick them out of the table T_RANGE checking earliest_time and latest_time against the dates you need.
Another table you might want to create would be the records or borrowers where the rating system changes over time.
Good Luck
PeterC