Wait(0), Wait() vs. Wait(n)I have a script that does many thing including creating a matrix from a datatable of ~17,500x40. The entire scrpit works fine when I run in in sections but fails to create the matrix when I run it as a whole. The issue appears to be at the step where m = dt << Get As Matrix();. I've inserted wait(0), wait() and even wait(30) but nothing seems to fix the issue. Any suggestions? Sorry I can't think of a way to share the code.
Thanks!
Re: Wait(0), Wait() vs. Wait(n)and... is JMP still running (can you submit JSL, use menus, change windows?) or is JMP in a loop (check task manager) or did JMP crash?
Re: Wait(0), Wait() vs. Wait(n)What do you mean by "looping through a directory and creating a master file?" What are the specific entities and actions involved?
Re: Wait(0), Wait() vs. Wait(n)It might be time to select Help > Books > Scripting Guide and review the section about formulas and formula management.
I advise against using formulas to populate data columns with a script unless it is necessary for the values to automatically update after the script is finished.
Re: Wait(0), Wait() vs. Wait(n)Thanks Craige, but the last step that finctions is just looping through a directory and cretaing a master file based on certain criteria. I know that data table is created. The very next step is "Get As Matrix' which does not happen.
Re: Wait(0), Wait() vs. Wait(n)If there are formula columns that need to be evaluated, adding dt<Re: Wait(0), Wait() vs. Wait(n)Sorry. I didn't answer your question. I do not get an error message but I've put in some checks to print to the log and stop seeing these after the matrix creation step.Re: Wait(0), Wait() vs. Wait(n)
@DaveLee,
Can you share the error ? Also - a sample of your data to see if this is reproducible ?
Re: Wait(0), Wait() vs. Wait(n)Yes, I explicitly call the table. For example, the data table is named 'dt', I create the matrix by the following m = dt << Get As Matrix();.
Re: Wait(0), Wait() vs. Wait(n)@DaveLee,
When you say, it fails to create a matrix - is it generating an error ?
May be ensure that the table is current might also help ?