In reply to xiangzaier.

Your code was mangled when you pasted it into the comments. Try posting your question and program to the SAS Support Communities (SAS/IML Forum).