You should be able to optimize this code by using an array. RADSONG$=SONG$[RADIOP]