I use "Big Class.jmp" to explain the operation requirements:
I am following the code to complete, but the speed is slow.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "test", formula( :weight - :height ) );
dt << run formulas;
Wait( 0 );
For( i = 1, i <= N Row( dt ), i++,
d1 = New Table( "a",
Add Rows( dt[i, 6] + 1 ),
New Column( "name", Character, Nominal ),
New Column( "step", Continuous ),
New Column( "level", Continuous )
);
d1[1 :: N Row( d1 ), 1] = dt[i, 1];
Column( "step" ) << Formula( dt[i, 4] + (Row() - 1) );
d1 << run formulas;
Column( "step" ) << deleteFormula;
Column( "level" ) << Formula( If( Row() == dt[i, 6] + 1, 10, Ceiling( (Row()) / ((dt[i, 6] + 1) / 9.9) ) ) );
d1 << run formulas;
Column( "level" ) << deleteFormula;
If( i == 1,
d2 = Current Data Table(),
Current Data Table( dt );
d2 << Concatenate( Data Table( d1 ), Append to first table );
d1 << Close Window;
);
);
1. Create a new column "test" to calculate "weight"-"height"
2. Generate the new table according to the following requirements and splice them into the first generated new table:
Each new form has three columns: "name", "step" , and "level".The number of rows in the new table is the "test" value +1 of each name obtained in the first step
"step" column is the data starting with "height", increasing by 1 for each row down and up to the "weight" row
"level" column: divide these rows evenly into 10 segments from small to large.The number of lines per paragraph may vary.
3. Splice the table one by one into a table.

How to complete the concatenation of the looping table in the memory array and then generate the data table once?
Thanks Experts!