Could you provide an example?
To get a boolean (0 or 1) matrix, just use a logical expression with a matrix:
proc iml;
x = {1 2,
1 3,
2 4};
b = (x > 2);
print b;
The IF-THEN/ELSE statement works on a scalar quantity. The ANY function and ALL function can be used with the IF-THEN statement to make logical decisions. For example:
if any(x) > 3 then print "Some element > 3";
else print "No element > 3";
if all(x) > 0 then print "All elements > 0";
else print "Some element <= 0";
For more information, see "IF-THEN logic with matrix expressions."