Here is an example of one way to do the looping. The real issue is how to get the list of tables to loop across. This example assumes that
Tables=>Subset
with a Subset By was used
names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dtSubsetList = dt << Subset(
By( :sex ),
All rows,
Selected columns only( 0 ),
columns( :name, :age, :height, :weight )
);
for each( {table}, dtSubsetList,
table << new column( "Ref");
wait(0);
table:ref[table << get rows where( :age == col max(:age))]=1;
);
Jim