Re: Leaving 4GL and returning from O/S
Posted in 1994
->From: doc@balr.com (David R. Gilbert) ->Subject: Leaving 4GL and returning from O/S ->Date: Wed, 9 Feb 1994 16:26:16 GMT ->Reply-To: doc@balr.com (David R. Gilbert) ->Organization: BALR Corporation -> ->Fellow Informix folk: ->I'm having a problem with the following 4GL code: -> -> FUNCTION edit_note ( filename ) -> -> DEFINE filename CHAR (30) -> DEFINE unixcmd CHAR (60) -> -> LET unixcmd = "vi ", filename CLIPPED <========== -> -> RUN unixcmd -> -> END FUNCTION -> ->When 'vi' appears on the screen, Informix has not 'released' it from ->curses mode - In other words, it's a mess. -> ->My questions is: How to I tell Informix that I need it to 'release' ->the screen temporarily, run the command, and then return to normal? -> ->I tried putting 'DISPLAY ""' before the run statement and it seemed ->to work a little better. -> ->I also need a easy way to re-display the Informix-4GL screen after the ->command returns. -> ->Any help would be *most* appreciated! Thanks in advance. -> ->- Dave ->(Doctor) David R. Gilbert (doc@balr.com) Consultant - BALR Corporation ->UUCP: ...uunet!balr.com!doc Snail: 600 Enterprise, Oak Brook IL 60521 -> "Can't stop moving. Can't stop moving. Can't stop." - NP of Rush If your environment, OS, etc., support it, try opening the vi session in a separate window, instead. On a SUN under OpenWindows, the syntax for the marked line becomes: LET unixcmd = "shelltool -c vi ", filename CLIPPED Another option is: LET unixcmd = "shelltool -c vi ", filename CLIPPED, " &" Using the " &" runs the command in the background and returns control to your Informix task without waiting for the vi session to complete. However, this may not be what you want in terms of your application. Newer versions of 4GL (starting with 4.X, depending on platform) use the RUN unixcmd WITHOUT WAITING syntax, instead of putting the " &" into the command string. Using a separate window should solve your cursor handling woes, and also add a level of multi-window classiness to your app. My users love the multi-window stuff. Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, SLS | / \\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\