it looks like you're trying to make a formula that multiplies its self by 2. this won't work and should return an empty value.
Also, "j" is a function for making matricies (note that it turns blue in the JSL editor) so I usually avoid using "j" as a variable just in case it might get interpeted in an unexpected way.
Working with column names and references can be pretty frustrating. Take a look at this strategy.
Inside the loop, first the column is created, and as its created, its given a handle "newcol" to use as a reference. Next there is the big eval(substitute)) clause. Inside this argument, the "col<<formula()" is defined as an expression (expressons aren't evaluated) with a place holder for the column name. Then that place holder is substuted for the column name. Still nothing is evaluated. After the substitution, the whole thing gets evaluated, because it wrapped in Eval.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
MyList = {"age", "height"};
ParamPlot = {"age2", "height2"};
For( i = 1, i <= N Items( MyList ), i++,
newcol=dt << New Column( ParamPlot[i] );
Eval(
Substitute(
Expr(
newcol << set formula( a * 2 ) ) ,
Expr( a ), As Name( mylist[i] )
);
));
JMP Systems Engineer, Health and Life Sciences (Pharma)