In reply to Rubel.

Dear Readers,
For help with SAS/IML issues, post your questions to the SAS/IML Discussion Forum.

For this case, the issue is that the Y matrix is not known to the module. Send it in as a parameter or use the GLOBAL statement.