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



Kurt and Chuck,

Wow, guys. What a wealth of information! I wished I had seen that redbook
a long time ago!

Kurt, WRT Chuck's statement about not being able to call these SQL stored
procedures from a CL program, how are you invoking this? It appears to not
be returning anything to the program that invoked it. I'll speculate that
you interrogate the SPErrLogP table after your SQL stored procedures have
completed execution to determine whether an error occurred.

Also, since you're declaring an "EXIT HANDLER FOR SQLEXCEPTION,
SQLWARNING", do I presume correctly that encountering a warning will cause
the SQL stored procedure to abend at the point of the warning? I'm not
sure I'd want that, but I guess I'd have to review real-world scenarios to
know for certain.

Thanks so much!
- Dan

On Thu, Apr 11, 2013 at 3:34 PM, Anderson, Kurt <KAnderson@xxxxxxxxxxxx>wrote:

Hi Dan,

I recently was working on putting error handling into stored procedures.
My SQL version of "MonMsg CPF0000" can be found here:
http://archive.midrange.com/midrange-l/201304/msg00063.html

This IBM redbook on SQL procedures and functions has been helpful. See
chapter 8 for error handling. 8.2 gets into specifics.
http://www.redbooks.ibm.com/redbooks/pdfs/sg246503.pdf

-Kurt


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.