Publication date: 07/08/2024

Send Multiple Messages

To send several JMP messages, add more << operators or more Send arguments:

dist << Quantiles( 1 ) << Moments( 1 ) << More Moments( 1 ) << Horizontal Layout( 1 );
Send( dist, Quantiles( 1 ), Moments( 1 ), More Moments( 1 ), Horizontal Layout(1));

Because << is an eliding operator, it combines arguments and works differently than if its arguments were grouped. You can stack multiple messages with extra << symbols to perform them all in order, from left to right.

Another way to stack messages is to send a list of messages:

dist << {Quantiles( 1 ), Moments( 1 ), More Moments( 1 ), Horizontal Layout( 1 )};

These approaches work well assuming that no value is returned as a result of one of your messages. However, if your goal is to send a message to the result of another message, add grouping parenthesis. The second line shows the wrong way to do it; the third line shows how to do it correctly:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

/* the following line is incorrect, and sends the Fit Mean message to the original data table object */

bv = dt << Run Script( "Bivariate" ) << Fit Mean( 1 );

/* the following line is correct, and sends the Fit Mean message to the resulting Bivariate object/report */

bv2 = ( dt << Run Script( "Bivariate" ) ) << Fit Mean( 1 );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).