I wanted to create a random matrix of zeros and ones. I wrote the following:

PROC IML;
START ZeroOneMatrix(rows, cols, mat);
threshold = 0.5;
y = J(1, cols, 0);

IF (rows > 0 & cols > 0) THEN DO;
mat = UNIFORM(y) > threshold;
DO i=1 TO (rows - 1) BY 1;
mat = mat // UNIFORM(y) > threshold;
END;
END;
FINISH ZeroOneMatrix;

RUN ZeroOneMatrix(10, 4, mat);
PRINT mat;