I was surprised recently to get a "Matrix has not been set to a value" error when attempting to assign an empty matrix using VALSET. If the syntax
x = {};
is acceptable, should it not be possible to do the same thing indirectly? For example,
call valset('x', {});
will generate the error referred to above. My actual code is more complex, where the 2nd argument to VALSET is a function that might occasionally return an empty matrix, so I have simplified things above to illustrate the point. I am using SAS/IML 15.1.