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.