If you want to use columns formatted as :colname, you can get them for example with something like this:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
col_names = dt << Get Column Names(Continuous, "String");
// dt << Get Column Reference(); /* all references */
/* one option */
col_list1 = dt << Get Column Reference(col_names);
/* second option */
col_list2 = Transform Each({col_name}, col_names,
Name Expr(AsColumn(Column(dt, col_name))); /* Column() isnt necessary but makes it more robust */
);
show(col_list1, col_list2);
Usually I use them as strings and then use Column() or As Column() depending on the situation (with some Name Expr() in the mix).
Quite often using list of strings of column names is enough if you combine that with Eval().
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
col_names = {"OZONE", "CO", "SO2", "NO", "PM10"};
//obj = dt << Cluster Variables(Y(:OZONE, :CO, :SO2, :NO, :PM10));
obj = dt << Cluster Variables(Y(Eval(col_names)));
col_list = Transform Each({col_name}, col_names,
Name Expr(AsColumn(Column(dt, col_name)));
);
obj = dt << Cluster Variables(Y(col_list)); /* wont work, see log for error */
/* Using Eval() and Eval Expr() */
cv_expr = EvalExpr(
obj = dt << Cluster Variables(Y(Expr(col_list)));
);
Eval(cv_expr);
/* using only Eval inside Y() should also work like earlier */
obj = dt << Cluster Variables(Y(Eval(col_list)));
-Jarmo