This is a perennial problem. Jconsole and JHS will show echo output before execution completes, but Jqt won't. There may be Jqt mechanisms, such as other windows, and special wd commands that would work. In my experience the best general solution to this problem is to have the loop where you currently have the echo, do an fwrite or fappend of status information to a file. Then, while the big update is running, a completely separate task can inspect the file contents. This is easy to do, works on all front ends, works on all platforms, and supports logging info that wouldn't easily fit into echo. In your case just replace the echos with an appropriate fwrite of formated data.
On Fri, Dec 16, 2016 at 3:22 PM, Michael Berry <[email protected]> wrote: > I am looping through a large database table 1,000 rows at a time and I > would like to show some reassuring output. I tried echo and smoutput (are > these different?) but both sat there until the whole explicit definition > ended and then printed out the progress notes all at once. Do I need some > sort of flush output command? > > Here is the loop I tried: > > while. 0 = _1 -: d=. ddfch sh, 1000 NB. ddfet fails unpredictably so use > ddfch instead > > do. > > data=. make_cells d NB. put into ddfet format as expected by run_tests > > scores=. run_tests data > > r=. make_cols data,. <"1 scores > > assert. 0 = ch2 ddins~ ('select * from ',y,'_scored where 0=1');r > > echo written=. written + 1{. $data > > end. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
