Informix pipe problem and WHENEVER
Posted in 1991
Path: emory!wuarchive!uunet!mcsun!ukc!slxsys!dircon!uaa1006 From: uaa1006@dircon.co.uk (Peter Miles) Newsgroups: comp.databases Message-ID: <1991Jul06.105652.26798@dircon.co.uk> Date: 6 Jul 91 10:56:52 GMT Organization: The Direct Connection, UK I think I may have come across two bugs in Informix 4GL, version 2.10.3F... First, I'm using the REPORT TO PIPE feature, to pipe output to a pager (less, in fact). The problem here is that if I quit from the listing (using less's q command), I am not returned to the 4GL program, but am returned to the UNIX $ prompt. Interestingly, if I view the complete output of the REPORT (until less says END), and then I quit from less, I get returned correctly to the 4GL program. I presume the problem is something to do with the pipe from the 4GL program being closed by less when I type 'q', and Informix cannot handle this properly. Is there a workaround for this? The second bug is to do with the WHENEVER ERROR statement. I'm using this to trap for errors and then GOTO my program's main menu (ie WHENEVER ERROR GOTO start_again). This statement appears in the MAIN part of the program and is after the LABEL start_again has been defined. The structure of the program is below: MAIN DEFINE vars LABEL start_again: WHILE TRUE WHENEVER ERROR GOTO start_again display menu, accept input CALL functions END WHILE END MAIN When I compile the program, the 1st and 2nd compiler phases proceed OK, but when it gets to the 3rd one, it aborts. In the .err file, it says: prog.ec(727) : error C2094: label 'start_again' was undefined This line is repeated six times, with different numbers (line numbers?) appearing in the brackets after the program name. If I remove the WHENEVER statement from the program, it compiles fine (even though I leave the LABEL start_again in the file, and use it elsewhere with a straight GOTO statement). This looks like a bug to me...any workarounds for this one? Thanks for your help. -- Pete PS: Please don't suggest we upgrade to version 4! We just heard from Informix UK, that this would cost over $3,000, just for upgrading 4GL. As we also use isql and esql, this would be far too much for my employers (probably cheaper to buy the whole lot new). -- Pete Miles uaa1006@dircon.co.uk ...ukc!dircon!uaa1006