Re: Screen printing with control and p
Posted in 1995
On Fri, 27 Jan 1995, Kerry Sainsbury wrote: } In article <791044263snz@boothbc.demon.co.uk>, } paul@boothbc.demon.co.uk (paul sellars) wrote: } > In 4GL control and p will output the screen contents to the file } > named in the environment variable DBSCREENOUT. } > Does anyone know of a way to pipe the output to a script file } > or call the control and p function from 4GL ? } } > Our users want to be able to use a single key stroke to print a screen } > immediately. Thanks in advance for any help. } } I think I can say with some degree of certainty that everybody's users } want to be able to do this. We do it via a couple of menu options. } } 1. Turn on screen dump facility (this sets DBSCREENOUT=screen.out) } 2. Run application program & press ^P (putting screenful(s) into screen.out) } 3. Turn off screen dump facility (prints screen.out, deletes screen.out, } and unsets DBSCREENOUT) The code to do the above is pretty simple to stick into menus and array operations. You need to have a DBPRINTER and DBSCREENDUMP set. In the example below DBSCREENDUMP is "screen_dump". It assumes you have a variable available named unix_command. The problem is having to stick the code into all the places you might want it. It is howevera two-key operation: control-p causes the screen to be written to the DBSCREENDUMP variable; control-o causes the printing and deletes the file. Of course the four lines could be put into a separate function which would be called. #for menus and the option is hidden command key ("CONTROL-O") #for display array, etc. on key (CONTROL-O) let unix_command = "nohup ", DB_PRINTER clipped, " screen_dump" run unix_command let unix_command = "rm screen_dump" run unix_command } } If you'd like to view a comprehensive list of suggested modifications of } Informix-4GL take a look at kcbbs.gen.nz:/informix/i4glmods.txt.Z. } This is the document Jonathan Leffler compiled in early 1993. } } It's a shame that Informix aren't putting more resource into tidying up } some of the irritating omissions in 4GL, now that we're in early 1995. } } --------------------------------------,------------------------------------- } Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ } Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/* } | mathcs.emory.edu:/pub/informix/faq/* } +64 9 377-4473 (work) 266-6011 (home) | http://www.garpac.com/informix.html }