And this would be the idea using data table subscripting and creating a new table
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");
dt2 << Sort(By(:sports),Replace Table,Order(Ascending),Copy formula(0)); // demo purposes
If(N Rows(dt) != N Rows(dt),
Throw("Rows do not match");
);
cont_cols1 = dt << Get Column Names(Continuous, "String");
cont_cols2 = dt2 << Get Column Names(Continuous, "String");
If(cont_cols1 != cont_cols2,
Throw("Columns do not match");
);
res = dt[0, cont_cols1] - dt2[0, cont_cols2];
dt_res = As Table(res);
For Each({colname, idx}, cont_cols1,
Column(dt_res, idx) << Set Name(colname);
);
-Jarmo