Here is a rework of your script, to make it syntactially proper. I can not speak to your logic, since you did not include what your variables xmax and ymax are, nor what the data table "Stanmore and Lam" contains
output = New Table( "Output",
AddRows( 1 ),
New Column( "Y (coronal) mm", Numeric, Continuous ),
New Column( "X (sagittal) mm", Numeric, Continuous )
);
// You don't add rows to columns, you add rows to data tables. But since you have allready added
// a row to the new data table, you don't need to add a second row
//:"Y (coronal) mm" << addRows( 1 );
//:"X (sagittal) mm" << addRows( 1 );
// The proper form for what you are trying to do is:
// :Name("complex name")
//:"Y (coronal) mm"[1] = ymax;
//:"X (sagittal) mm"[1] = xmax;
:Name("Y (coronal) mm")[1] = ymax;
:Name("X (sagittal) mm")[1] = xmax;
dt2 = Open( "Stanmore and Lam.jmp" );
dt2 << Join(
With( Data Table( output ) ),
// You may want to use the "UPDATE" option to copy the matching rows from the joining table to the
// initial table
// Update,
// The proper naming structure has been replaced here too
By Matching Columns( :Name("Y (coronal) mm") = :Name("Y (coronal) mm") , :Name("X (sagittal) mm") = :Name("X (sagittal) mm") )
);
Jim