One example
Names Default To Here(1);
dt = Open("$DOWNLOADS/example data.jmp");
dt << Clear Select;
// as all columns are interest to use and they are always in pairs
// we can loop over every other column
col_list = dt << Get Column Names("String");
first_col_indices = 1::N Items(col_list)::2;
new_col_list = {};
For Each({first_col_idx}, first_col_indices,
first_col_name = Column(dt, first_col_idx) << get name;
new_col_name = Word(1, first_col_name, ":");
Insert Into(new_col_list, dt << New Column(new_col_name, Character, Nominal, << Set Each Value(
Column(dt, first_col_idx)[Row()] ||"_"||Column(dt, first_col_idx + 1)[Row()]
)));
);
/*
For Each({new_col, idx}, new_col_list,
dt << Move Selected Columns(new_col, After(Column(dt, first_col_indices[idx] + 1 + idx - 1)));
);
*/
-Jarmo