I need help to understand what the code below is doing ?
The Do Until () together with group by loan_id is what is confusing me mainly...
Thanks in advance.
Code:
data fccont_duration2 ( keep = loan_id dur ) ;
length distr $ 32767 ;
do until ( last.loan_id ) ;
set fccont_duration ;
by loan_id ;
if end_dt > start_dt then
substr (distr, 5373 + start_dt, end_dt - start_dt + 1) = repeat
('1', end_dt - start_dt) ;
else
substr (distr, 5373 + start_dt , 1) = '1' ;
end ;
dur = length (compress (distr)) ;
run ;