× 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've been experimenting
with SQL procedures and functions, and have discovered how to debug
procedures after reading this link (http://www-01.ibm.com/support/docview.wss?uid=nas197633f5d0d583c0f86256a1e007624f5).

I
was able to confirm that
copies of the sql statements had been placed into QSQDSRC as was
described in the article.
I used the DBGVIEW(*SOURCE)
parameter in the RUNSQLSTM statement as per the above link..

I now want to to the same
thing with a function I've written, but when I create the function
(which interfaces to an RPGLE service program sub-procedure), again with

DBGVIEW(*SOURCE, I am unable to put it into debug, and I noticed that
there was no source
member in QSQDSRC for the function I created. I get the following
message when I attempted to use STRDBG:

CPF1912 Program CLMAGEXS in
library EVEDEV cannot be accessed.

All

the documentation I've
read implies that debug can be used with procedures, functions, and
triggers. Should I expect that the function code be generated to QSQDSRC
just like the procedure?

What I'm actually trying to
do is issue an SQL error from the function if it determines that the
return value from the sub-procedure denotes that an error has occurred
(byte
1 will be '1'). I've found the SIGNAL command and that works in a test
procedure I
created, so now I just need to know how to obtain the sub-procedure
return value from within the SQL function so that an error condition can be transposed to an SQL error with the SIGNAL..

Any advice for this
would be
appreciated as well.






_________________________________________________________________
Get the latest jobs delivered. Sign up for SEEK Jobmail.
http://clk.atdmt.com/NMN/go/157639755/direct/01/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.