Hi,
I am not sure why the code I provided is not working for you. You might try the following:
1) Run the original code I provided, alone, in a new window. Does it work? If not, what version of JMP are you using? Direct data table indexing was added a few versions ago, but isn't in JMP 12, for example.
2) Assuming 1) above works, the next step is to replace all instances of "dt" with "yields", run the new code alone in the new window. This worked for me and I expect it to work for you if 1) worked for you.
Names Default To Here(1);
//create a table with roughly 10% missingness
yields = astable(J(1e5,5,randominteger(1, 20)/(randomuniform() > 0.1)));
For( i = 1, i <= N Col( yields ), i++,
yields[Loc( Is Missing( yields[0, i] ) ), i] = 0
);
3) If the data in your table is formula-based, the formulas may have been "written" to the column, but may not be finished evaluating, by the time the JSL intended to fix the missings begins to execute. Make sure all formulas are completely updated, before the code runs, by preceding the code with this line:
Yields << run formulas;
4) Make sure that "Yields" is not referencing anything else other than the data table of interest... not a column name, another variable name, a table variable, etc. For this reason, as a best practice I recommend using "dt" somewhere in any variable name used to point to a table; while it is easy to envision overwriting a table handle "Yields" by inadvertently naming a matrix or vector of values "Yields", it is much less likely to accidentally name such a matrix or vector "YieldDt". However, since your program works if you pause execution, I do not believe this is the issue.
If 1) and 2) work for you and neither 3) nor 4) fix the issue, I will need more information to help you: a sample, sanitized table and a snippet of code that can be run against that table to show that the replacement isn't working on that table.
Cheers,
Brady