You can also use list with select column group but you have to evaluate it
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y});
dt << group columns("pollutants", :Ozone :: :Lead);
groupnames = {"xy", "pollutants"};
Eval(EvalExpr(dt << select column group(Expr(groupnames))));
-Jarmo