In reply to gianni.

I don't know. The trick should work even in "complex cases." For an older alternative, see "Monitor the progress of a long-running SAS/IML program."