{{tag>category:"AREV32" author:"Greg Helland" author:"Dave Harmacek"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Process Yield in AREV32 (AREV32) ==== === At 01 AUG 2011 06:34:26PM Greg Helland wrote: === I have an AREV process that prints a recap of what was entered and then waits for the user to tell AREV to continue processing. Since AREV32 I now have a problem that the OI Print window appears but does not show any data in the printout because the AREV32 window is waiting for input. The user cannot tell the process to proceed until they have reviewed the printout. How do I tell AREV32 to release the data to the printer OR to wait until all output is sent to the virtual printer before processing the next window call in AREV32? Thanks, Greg ---- === At 01 AUG 2011 06:37PM Greg Helland wrote: === ---- === At 02 AUG 2011 08:12AM Dave Harmacek wrote: === You can print to the screen in Arev32. To do this cleanly I separate my printing program from the calling process. The calling program does EXECUTE "YOUR_PRINTING_PROGRAM options (T)" and you YOUR_PRINTING_PROGRAM detects that it is printing to the screen IF GETPRINTER() ELSE @VIEW.MODE = 1; CALL INIT.VIEW( integer_width) END examine @TCL.SENTENCE for the options You can define a printer in Arev32 and SETPRINTER to that printer before you start this process. If you are getting the OI Print window, then your SETPRINTER is set to OIPI-PORTRAIT or OIPI-LANDSCAPE which waits for input. Dave Harmacek Harmacek Database Systems ---- === At 02 AUG 2011 01:18PM Greg Helland wrote: === Hi Dave, Thanks for the input. The execution of code occurs in AREV32 and then sends the verification printout to OI Print Window with SETPRINTER OIPI-LANSDCAPE as you indicate in your second paragraph. I was calling the printing program with PERFORM, then, based upon your suggestion, I tried EXECUTE. That released the queue to print and held up the next AREV32 collector window asking to continue execution or not. HOWEVER, once I did that, AREV32 lost the active select list and started printing the entire file instead of the select list. So, I added code into the printing program to find the select list from @TCL.STACK and then reactivate it with a PERFORM statement. What seems to be happening now is that once I use a PERFORM statement (even in a program that is called using EXECUTE) AREV32 continues the previous processing and displays the collector window and therefore does not print the OI Print Window data. Can't use EXECUTE in the printing program because it leaves the selected records at that TCL level. Here is the flow within the AREV32 program: Perform "getlist xx' Execute 'PRINTINGPROG' (normally accepts active select list) Catalyst Verification Window Continue processing if Y, stop processing if N Any further suggestions? Thanks, Greg ---- === At 02 AUG 2011 01:22PM Greg Helland wrote: === Just to further clarify, the PRINTPRG is executing LIST statements, not custom print outs. ---- === At 02 AUG 2011 01:22PM Dave Harmacek wrote: === move the "getlist xx" into the PRINTINGPROG program Execute is supposed to move to a different level, where each level has isolated SELECT cursors then, verification window, then, if ok then that same getlist Dave Harmacek Harmacek Database Systems ---- === At 02 AUG 2011 02:32PM Dave Harmacek wrote: === In this case, don't print (PE), just use (T). This is what @VIEW.MODE and Init.View are for, the (T) mode. Dave Harmacek Harmacek Database Systems ---- === At 02 AUG 2011 03:02PM Greg Helland wrote: === The LIST statements are already in the PRINTPRG and so is the GETLIST. I need to print a hard copy out of OIPI Preview window of the verification printout so needs to do (PE), not (T). Does that make sense or am I missing something you are saying? ---- === At 02 AUG 2011 03:43PM Dave Harmacek wrote: === I think about this as if I had multiple processors doing the work. Sometimes, one processor is running independently of the other. So, I suggest you print to the screen for the user verification. Then, if verified, print it again directly to the printer. Dave Harmacek Harmacek Database Systems ---- === At 02 AUG 2011 05:21PM Greg Helland wrote: === OK, solved it. Had to create a function in OI that tests for the existence of the OIPI Print Preview window and stays in a loop with a delay(2) until the preview window is closed. This allows the printing to complete and then returns control to AREV32 when complete. Call this OI function from within AREV32 with CTO_GUI_FUNCTION. Thanks Dave for all of your help! Greg [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=018086EA0004C89DEADD8D100|View this thread on the Works forum...]]