Now i understand your problem.
The retained variables are already existing in your original data set and also contains data.
DATA FLOWFRED.FMFLOW_LOANSDROPPED_TOT_RPT;
SET FLOWFRED.FMFLOW_LOANSDROPPED_RUN_TOT;
RETAIN _RUNNING_NOTE_BALANCE_15YR;
RETAIN _RUNNING_NOTE_BALANCE_20YR;
RETAIN _RUNNING_NOTE_BALANCE_30YR;
_RUNNING_NOTE_BALANCE_15YR=SUM(_RUNNING_NOTE_BALANCE_15YR,NOTE_BALANCE_15YR);
_RUNNING_NOTE_BALANCE_20YR=SUM(_RUNNING_NOTE_BALANCE_20YR,NOTE_BALANCE_20YR);
_RUNNING_NOTE_BALANCE_30YR=SUM(_RUNNING_NOTE_BALANCE_30YR,NOTE_BALANCE_30YR);
run;
Run the above code and you find the correct result in the new created variables starting with _ .
... View more