RE: Signal Handling in 4gl
Posted in 1999
Topics: SQL Development & Query Writing, Connectivity: ESQL/C, 4GL & Embedded SQL
This is a very general kind of thing happens to programmers. Following code structure will help Whenever error continue (your source code that SELECTs rows) If sqlca.sqlerrd[3] > 1 then (rows returned > 1) (action you may take) end if Whenever error stop Mukund -----Original Message----- From: brian@ASL.CA [mailto:brian@ASL.CA] Sent: Wednesday, September 01, 1999 2:14 PM To: informix-list@iiug.org Subject: Signal Handling in 4gl We have a 4gl app that occasionally dies due to "a subquery has returned not exactly one row". Of course, it has created a temporary file to which it was planning to write. When it dies, it can't clean up. Is there a way that we can get the app to clean up on error, before it folds? B. -- Please send administrative requests to admin@ASL.CA Brian P. Hampson ASL Analytical Service Laboratories Ltd System Administrator, Vancouver, BC (604)253-4188 ----------------- http://www.ASL.CA/ ---------------------------- I'm not speaking for the company <- They made me say that.
Shevkar, Mukund (Mukund.Shevkar@dgs.ca.gov) wrote: : : This is a very general kind of thing happens to programmers. : Following code structure will help : : Whenever error continue : (your source code that SELECTs rows) : If sqlca.sqlerrd[3] > 1 then : (rows returned > 1) : (action you may take) : end if : Whenever error stop I was hoping that there might be a more general solution, since I don't know what errors might occur, and it would be nice to have some sort of trap function like signal(3) -- Please send administrative requests to admin@ASL.CA Brian P. Hampson ASL Analytical Service Laboratories Ltd System Administrator, Vancouver, BC (604)253-4188 ----------------- http://www.ASL.CA/ ---------------------------- I'm not speaking for the company <- They made me say that.