I have a command sequence like this:-
dt = Data Table("Input Copy");
dt1 = Data Table("Matrix Splits Table");
dt << Join(
By Matching Columns(lot_id == dt1:Waferlot),
By Matching Columns(wafer == dt1:Wafer),
Output Table Name("Joined Input Table")
// SBIN summary by SITE and split
Data Table("Joined Input Table") << Summary(Group(:tst_temp, :test_cod, :SBIN_NUM, :SBIN_NAM, :SITE_NUM), N, Subgroup(:Split), output table name("SBIN by Split"));
Now for really large data sets, the Join takes about 1-2 mins. In the meanwhile the following summary command starts to execute and shows no output.
Can I put a sequence that waits for the Join to execute and once it finishes then only start with the Summary command.
Solved! Go to Solution.
Using Wait(0) in this case is the right answer, but more generally, yes, you can schedule an expression to be evaluated in the future using the Schedule( seconds, expression ) function
one more question both regarding wait(0) and schedule(). I didn't start a new thread as this thread seems to be the best place to ask this. As I understand for schedule() you need to know the time in advance. Wait(0) gives the System time to breath but does not work for me in case the computational Task last longer than a breath. To be more concrete:
Let's say you have a stepwise Regression which may last 1 sec but also may last 10 sec. Now you do not want to wait/schedule the next task for 11 sec after the first to be sure. If the first Task ends earlier you want to start with the next right away, e.g. run the model. if it last longer then you want to wait until it's finished.
Here is some example code, for schedule you would Need to know the Timing in advance. and wait(0) won't work. wait(10) does work but you will have to wait longer than you need. Any guidance would be welcome.
Names Default to Here (1);
dt = Open( "$SAMPLE_DATA/Bands Data.jmp");
fm_step = dt << Fit Model(
Y( :Name( "Banding?" ) ),
:type on cylinder,
:paper mill location,
:proof cut & RS,
:viscosity & RS,
:caliper & RS,
:ink temperature & RS,
:humidity & RS),
Personality( "Stepwise" ),
Run( Prob to Enter( 0.05 ), Prob to Leave( 0.01 ) )
/* Run the stepwise regression */
fm_step << Go;
/* Wait(0) does not work to wait until the SR finished it’s job, wait(10) waits too long */
/* Run the model for the selected variables */
fm_step << Run Model;
The Wait( seconds ) function pauses JMP for the specified amount of time. Usually JMP proceeds to evaluate each line as fast as possible, even if previous lines have not completed yet. The Wait( 0 ) is a special case that causes JMP to synchronize on-going computation before proceeding with the next line.
I agree that Wait() and Schedule() will not work if your case. Have you tried the Finish method instead of the Go method?
The scripting index ('Help > Scripting Index') has an example:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Fitness.jmp" );
obj = Fit Model(
Y( :Oxy ),
Personality( Stepwise ),
obj << Finish;