I have a problem where I need to generate a vector of values from using the rantbl function where I want to change the probabilities via a vector of probabilities:

A brute force way of doing this with lots of commas would be this:

proc iml;

rt = RANTBL(j(10,1,8957553), 0.2, 0.125, 0.125, 0.125, 0.125, 0.04, 0.04, 0.04, 0.04, 0.04, 0.0055556,
0.0055556, 0.0055556, 0.0055556, 0.0055556, 0.0055556, 0.0055556, 0.0055556,
0.0055556, 0.0055556, 0.0055556, 0.0055556, 0.0055556, 0.0055556, 0.0055556,
0.0055556, 0.0055556, 0.0055556) -1;
print rt;
run;

But I would like to use something where I can change the probabilities with a different vector of probabilities.
Obviously I can write a routine to do this but it would be nice if I could pass the vector of probabilities to rantbl in
code that would look like this:

proc iml ;
prob = (1/5)||j(1,4,(5/40))||j(1,5,(2/50))||j(1,18,(1/180)) ;
rt = RANTBL(j(10,1,8957553), prob) -1;
print rt ;
run;