Manas asked about the DB2 RAISE_ERROR equivalent in IDS.
> *The RAISE_ERROR function causes the statement that includes the function to
> return an error with the specified SQLSTATE, SQLCODE -438, and
> diagnostic-string.*
In stored procedure language, you can use the RAISE EXCEPTION statement to generation an error.
>>-RAISE EXCEPTION--SQL_error_var--+---------------------------------+--;--><
'-,--ISAM_error--+----------------'
'-,--error_text--'
The special error number -746 allows you to produce a customized message:
RAISE EXCEPTION -746, 0, 'Posting on topic messages on Usenet error.';
http://publib.boulder.ibm.com/infocenter/idshelp/v10/topic/com.ibm.sqls.doc/sqls949.htm
You can, of course, write a function called RAISE_ERROR using the above, if you so desire. You could even have it return error -438, if you like, but IDS thinks error -438 means "Call back function must be NULL if time-out value is -1."
Sincerely,
Christopher Coleman
Steering Committee President
Kansas City Informix Users Group
www.iiug.org/kciug
Database Analyst
Pharmacy Division
Mediware Information Systems, Inc.
sending to informix-list