Subscribe Bookmark RSS Feed

JMP Script will not execute fully in 1 run, wait() will not work

Software: JMP 7.0.2
Op sys: Win XP

Problem: I have been scripting in JMP for years and I am accustomed to using the Wait statement when the JMP scripting language gets ahead of itself in calculations or otherwise errors out. In this case the script runs perfect if I highlight the first half, run it, highlight the second half, run it. Although, together they will not run, a wait in between does not fix it. It appears to be a problem in plotting / survival analysis plot. This will not run unless it is run individually. Any suggestions?



Here is the code:

First Section:

(initialization code, data table opening etc)
AllSummary = outcalctow << Summary(
Group( :WUC, :PN, :SN, :RemInt),
Sum(:ADJTOW),
sum(:Suspension),
Max(:Init_dt)
);

Allsummary2 = AllSummary <<
Join(
With(inputs),
By Matching Columns( :WUC = :WUC ),
Drop multiples( 0, 0 ),
Name( "Include non-matches" )(0, 0)
);

close(allsummary,no save);
AllSummary2 << Select Where(:Name("Sum(ADJTOW)") < :Mintow | :Name("Sum(ADJTOW)") > :Maxtow | :Name("Max(Init_Dt)") < :MinDate | Name("Max(INIT_DT)") > :MaxDate);
AllSummary2 << Delete Rows;


//**** The following will not run unless I run the above first and then the following code.

wait(5);
Weibull1 = Survival(
Y( :Name( "Sum(ADJTOW)" ) ),
Censor( :Name( "Sum(Suspension)" ) ),
Failure Plot( 0 ),
Survival Plot( 1 ),
Weibull Fit( 1 ),
Fitted Quantile( 1 ),
by(
:Name( "WUC of outCalcTOW By (WUC, PN, SN, RemInt)" )
)
);

weibullreport = weibull1 << report;
weibulloutput = weibullreport[tablebox(2)] << make combined data table;
2 REPLIES
The following code must be run separately. The top code will bomb out at this point
wait does not work.
wait(5);
Weibull1 = Survival(
Y( :Name( "Sum(ADJTOW)" ) ),
Censor( :Name( "Sum(Suspension)" ) ),
Failure Plot( 0 ),
Survival Plot( 1 ),
Weibull Fit( 1 ),
Fitted Quantile( 1 ),
by(
:Name( "WUC of outCalcTOW By (WUC, PN, SN, RemInt)" )
)
);

weibullreport = weibull1 << report;
weibulloutput = weibullreport[tablebox(2)] << make combined data table;
fixed problem, couldn't delete message.

I added more code below the above, added in some more waits and somehow it now works. JSL is so touchy sometimes!