3. Embedded QUEL for COBOL : Runtime Error Processing : Programming for Error Message Output
 
Share this page                  
Programming for Error Message Output
By default, all Ingres and forms system errors are returned to the EQUEL program, and default error messages are printed on the standard output device. As discussed in the QUEL Reference Guide and the Forms-based Application Development Tools User Guide, you can also detect the occurrences of errors by means of the program using the inquire_ingres and inquire_frs statements. (Use the latter for checking errors after forms statements. Use inquire_ingres for all other EQUEL statements.)
Because COBOL does not allow the use of local function arguments, you cannot use the EQUEL error handling procedure described in the QUEL Reference Guide that entails creating an error-handling function and passing its address to the Ingres runtime routine IIseterr().
Instead, you can simulate the operations of an error function using the set_ingres statement. You can also use this statement to suppress the default messages. The general syntax of the set_ingres statement is:
##  set_ingres(EQUELconst=val{,EQUELconst=val})
where
EQUELconst is one of the valid EQUEL constants to which status information can be assigned.
val is the value that is assigned to the EQUEL status flag. This may be a constant or a program variable containing the value to assign.
The following table presents two of the legal values and types for EQUELconst.