cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Tina
Level III

Alternative to Wait()

Hi all,

in my script I would like to stop the execution until the further step was completed. I would like to do a stepwise model selection and wait with the further script execution until this was succesfully completed.

Currently I am using "Wait( 30 )" to be sure that it is really completed. I also tried "Wait( )" but then sometimes the execution of the script proceeds to early. Wait( 0 ) does not work at all.

Does anyone know of a way that I could implement this?

 

Best,

Tina

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Alternative to Wait()

Select Help > Books > Scripting Guide.

Select Help > Scripting Index > Fit Stepwise > Finish.

Example from help:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Fitness.jmp" );
obj = Fit Model(
	Y( :Oxy ),
	Effects(
		:Runtime,
		:Weight,
		:RunPulse,
		:RstPulse,
		:MaxPulse
	),
	Personality( Stepwise ),
	Run
);
obj << Finish;

View solution in original post

6 REPLIES 6
Byron_JMP
Staff

Re: Alternative to Wait()

I'm not sure about this case specifically, but I use Run Formulas alot. It forces the operations on a table to complete befoe moving on (like evaluating a formula column, or completing a join)

dt << Rerun Formulas;
JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: Alternative to Wait()

Fit Stepwise has a message Finish that can be used to make sure that it completes that process. Go starts a background process and returns immediately to the next step in your script.

Tina
Level III

Re: Alternative to Wait()

Thank you for this information!

At the moment my script looks roughly like this:

obj_expr = Expr(
obj = dt << Fit Model(

Y(rs_list[i]),
Effects,
Personality( "Stepwise" ),

Run( Stopping Rule( "Minimum AICc" ) ) // TO DO: BIC statt AICc als
Alternative

)
);

Substitute Into( obj_expr, Expr( Effects ), Parse(" Effects(" ||
modeleffects || " )"));
Eval( obj_expr );
obj << Go;

What you mean is that 'Go' just starts a background process and then the
next step of the script is immediately run, is that correct?
How would I access the 'Finish' message from Fit Stepwise?

 

Tina
Level III

Re: Alternative to Wait()

So it seems like just adding  

obj << Finish;

after the

obj << Go;

will work. Is that the way you would propose to code it?

 

Re: Alternative to Wait()

Select Help > Books > Scripting Guide.

Select Help > Scripting Index > Fit Stepwise > Finish.

Example from help:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Fitness.jmp" );
obj = Fit Model(
	Y( :Oxy ),
	Effects(
		:Runtime,
		:Weight,
		:RunPulse,
		:RstPulse,
		:MaxPulse
	),
	Personality( Stepwise ),
	Run
);
obj << Finish;
Tina
Level III

Re: Alternative to Wait()

Thank you very much!