× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Below is what it stated in the IBM V6R1 upgrade memo:
SQLCODE and SQLSTATE changes
SQL routines that contain references to SQLCODE and SQLSTATE within an IF-THEN-ELSE statement
will not work the same. SQLCODE and SQLSTATE will be set to 0 and the diagnostic area cleared before
the first statement is executed in the THEN or ELSE clause. For example:
IF SQLCODE < 0 THEN
SET SAVE_CODE = SQLCODE;
END IF;
If SQLCODE is negative when the IF is executed, SAVE_CODE is set to 0. In previous releases,
SAVE_CODE was set to the negative value contained in SQLCODE.
These changes apply only to functions and procedures that are built using the LANGUAGE SQL
keyword on the CREATE PROCEDURE, CREATE FUNCTION, CREATE TRIGGER, ALTER PROCEDURE,
or ALTER FUNCTION SQL statements. They do not apply to higher-level language programs.




It says the SQLCODE/SQLSTATE will be set to 0 before first statement is executed in the THEN or ELSE clause. Does anyone know what will happen to the SQLCODE/SQLSTATE after the IF ELSE block? Do they get restored back to what they were? This is such a strange enhancement. What is the purpose of this enhancement?




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.