Hello, I have some JSL code which includes double loop and a the end of the code includes a line which i want to group the columns but it doesn't do that.
1. How can I fix the code?
2. When running the script is any way that the new table opens will be another one and not the original table? I mean I want another file will be opened..
The code and table are attached:
dt = open("C:\JMPCommunity\DataTableExample.jmp");
s_list = {sen1, sen2, sen3, sen4, sen5};
test_list ={test1, test2, test3};
tokens_list={Col1, Col2, Col3};
g_list={g1,g2,g3};
For(j = 1, j<=Length(test_list), j++,
For( i = 1, i<= Length(s_list), i++,
dt << New Column ( test_list[j] ||"_" || s_list[i],
Numeric,
Continuous,
Formula(
Num(Word( i, As Column(Column(tokens_list[j] )), "|" ))
)
)
);
g_list[j] = dt << Group Columns(":" || test_list[j]|| "_" || s_list[1], Length(s_list))
);