Hi Rick, can we achieve similar results without using Proc IML, ie using only base SAS data steps? thanks Qui