Here is an example, taken directly from the Scripting Index
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" );
obj = dt <<
Association Analysis(
Item( :Product ),
ID( :Customer ID )
);
obj <<
Save Script to Data Table(
"My Analysis", <<Prompt( 0 ), <<Replace( 0 )
);
Jim