× 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.



I think I have error dates handled now:

Where @@@@@@@@@@ is a placeholder for the library, in the RPG program
that generates the SQL source member for the UDF, I now have with the
new lines marked):

DROP FUNCTION @@@@@@@@@@/DISPLAYDAT;
create function @@@@@@@@@@/DISPLAYDAT(i_date NUMERIC(8))
returns DATE
language sql deterministic not fenced set option datfmt=*ISO
begin
declare continue handler for sqlexception **NEW**

return date('99991231000000'); **NEW**

if i_date = 0 then return date('00010101000000'); end if;
return date(digits(i_date) concat '000000');
END

What I know about handlers wouldn't buy you a cup of coffee, so is there
any reason why this handler would create a problem? Am I correct in my
understanding that a handler's scope is confined to the innermost BEGIN
block in which it resides? That it can't leak out and wreak havoc with
exceptions elsewhere?

--
JHHL




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.