In reply to Minrong Zheng.

The IML procedure contains syntax for looping. Instead of calling PROC IML within a loop, use a loop within PROC IML to repeat a computation. See this article on 10 ways to get started with the SAS/IML language.