In reply to Rick Wicklin.

Hello, Rick:
Could you advise what happen if I have multiple rows for Items, and would like to have all different combinations for each row of the item? FInally, I would like to append all rows, how can I do so? Thank you for any advice.
proc iml;
N=5;
k=3;
idx = allcomb(N, k);
Items = {"Broccoli" "Carrots" "Cucumbers" "Peppers" "Tomatoes",
"Chicken" "Beef" "Pork" "Duck" "Lamb",
"Water" "Apple Juice" "Wheat Grass" "Orange Juice" "Soda"};
C1=Items[1,];
C2=Items[2,];
S1 = C1[,idx];
S1 = shape(S1,0,k);
S2 = C2[,idx];
S2 = shape(S2,0,k);
S3 = C3[,idx];
S3 = shape(S3,0,k);
D=S1//S2//S3;
print Items C1 C2 C3 S1 S2 S3 D;
quit;