That is not how you invoke stored procedures but rather programs. Your (SQL)
call should look something like:
CALL AMFLIB/TEST_DBG_2(13000);
There is nothing wrong with using a literal (13000) as an input value in
your testing.
You are using the right tool for testing.
For the output parameter testing, you may try specifying a question mark as
a literal (?).
BTW, you're declaring a result set as being returned yet you don't open a
cursor in your SP. Or is there some code missing (i.e. copy/paste error)?
Finally, as is always the case when something is failing with iNav, make
sure you have the latest iSeries Client Access service pack loaded on your
system and propagated to your PC, per this link:
http://www-912.ibm.com/s_dir/slkbase.nsf/recommendedfixes
Hth, Elvis
Celebrating 11-Years of SQL Performance Excellence on IBM i, i5/OS and
OS/400
www.centerfieldtechnology.com
-----Original Message-----
Subject: Debugging Stored Procedures
I've been trying to get the debugger up and running per section 3.10.1
of
http://www.redbooks.ibm.com/abstracts/sg246503.html.
I have been successful at stepping through stored procedures with no
parameters, however when calling a stored proc with an IN parm of
Integer type, the debugger throws an exception on the first line of the
stored procedure:
"Exception: Pointer not set for location referenced"
This is how I call the stored procedure:
CALL PGM(AMFLIB/TEST_DBG_2) PARM(13000)
Also, how would I call a stored procedure with IN and OUT parms from the
console?
Procedure:
CREATE PROCEDURE AMFLIB . TEST_DBG ( IN CUSTNUMBER INTEGER ) RESULT SETS
1 LANGUAGE SQL SPECIFIC TEST_DBG_2 READS SQL DA
SOURCE
BEGIN
DECLARE TOTALACTIVITY DECIMAL ( 8 , 3 );
SELECT SUM ( JQGLVA ) INTO TOTALACTIVITY FROM AMFLIB . MTHACTE WHERE
CUSNO = CUSTNUMBER;
END;
As an Amazon Associate we earn from qualifying purchases.