Rick,
It looks like a encryption tool .
In data step ,there are function RANK() and BYTE() could replace your "valueList ". Like this :

substr(ID,&maxCoef-k,1) = values[c[k]+1];
--->
substr(ID,&maxCoef-k,1) = byte(rank('A')+c[k]);