Re: Reports on BAKCGROUND
Posted in 1997
}From: Jacob Salomon <jake@apparel.net> }Date: Thu, 27 Mar 1997 10:19:03 GMT }X-Informix-List-Id: <news.35865> } }ramp wrote: }> My environments is Informix on-line 4.10 with a Unix Siemens-Nixdorf }> machine (RM-600), and i need in 4GL to send reports in background for }> continue with other statements (inputs , display , ...) in my program, }> so the user can continue working . } }4.10? Yikes!! My sentiments precisely. }Anyway, there is no rule that says you have to generate a report in a }loop. You can start the report in you initialization code and, as you }input data from users and insert to / select from the database, you can }pepper your code with OUTPUT TO REPORT statements. } }You just have to remember to FINISH report before your program exits. }And don't expect to see the report until the program has finished, }although you CAN monitor the report file while the program is running. }(You can use the "tail -f" command on it.) These statements are all true, but I think that the questioner is really wanting to be able to have the report running in the background while the user does INPUT etc -- ideally, multi-threading the I4GL program. This is not possible, of course -- I4GL is the antithesis of a thread-safe programming language (or, more accurately, the support libraries are anything but thread-safe). However, you can achieve the same effect by having a separate program which produces the reports. The tricky problem is how to get the control information to the separate report process. This can be done using command line arguments, or using a (permanent) table in the database to contain the information which the report program deletes as it completes. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>