The "Historical Data End at Row()" appears to not be able to evaluate a variable. Therefore, one needs to handle that in JSL. A common way to do that is to use "Eval Insert()".
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" );
row_end = 16;
Eval(
Parse(
Eval Insert(
"obj = dt << Model Driven Multivariate Control Chart( Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ), Historical Data End at Row( ^row_end^ ))"
)
)
);
Or, one could use a Substitute() function to handle the issue
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" );
row_end = 16;
Eval(
Substitute(
Expr(
obj = dt << Model Driven Multivariate Control Chart(
Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ),
Historical Data End at Row( theEnd )
)
),
Expr( theEnd ), row_end
)
);
Jim