Scripting Guide > Scripting Platforms > Create Column References > Specify Multiple Column Names at Once
Publication date: 08/13/2020

Specify Multiple Column Names at Once

If you have a lot of column names, instead of listing each one individually, you can use lists as column arguments. The following example gets the column names from a list and runs a Distribution on each column in the list.

dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dt << Fit Group( Oneway( Y( {:SO2, :POP} ), X( :State ) ) );

If you do not know the column names when you are writing the script, use column indices, as done in the following example.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Distribution( Y( 1::N Col( dt ) ) );

You can also use indices when specifying effects as shown here:

dt << Fit Model( Y( :y ), Effects( 1 :: 4 ) );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).
.