View previous topic :: View next topic
|
Author |
Message |
shasikanth
New User
Joined: 18 Aug 2003 Posts: 4
|
|
|
|
Hi,
I have a batch DB2 program(PGM1) which call a store procedure(SPROC).
the PGM1 has a cusrsor defined WITH HOLD and FOR UPDATE of function. For every fetch on this cusrsor i will be calling the stored proc the after the return from SPROC the PGM1 will be updating the row with WHERE CURRENT cursor. But at this point i am hitting SQLCODE -508 ("THE CURSOR IDENTIFIED IN THE UPDATE OR DELETE STATEMENT IS NOT POSITIONED ON A ROW")
Can some one tell me why it is throwing this message.
Thanks in advance... |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
check if the return code from u r SPROC is good .Because if that fails then u r cursor will not position at the required point |
|
Back to top |
|
|
shasikanth
New User
Joined: 18 Aug 2003 Posts: 4
|
|
|
|
The return code from proc is good.
I am doing the update(where current of) only when the return from the STOR PROC is gud... |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
is u r sql code from the proc =100 the cursor will not work
What is u r sql code? |
|
Back to top |
|
|
shasikanth
New User
Joined: 18 Aug 2003 Posts: 4
|
|
|
|
tHE SQLCODE IS ZERO. This is how the code is..
EXEC SQL
CALL DB2XXX.TTT_TT
(
)
END-EXEC.
EVALUATE TRUE
WHEN SQLCODE--SUCCESSFUL
CONTINUE and do where update of oncurrent curosr
ELSE
Abend
Hope atleast now you will help me answering to my problem without asking further obvious Questions..... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
further obvious questions? my, my, a little touchy; normally a response from someone who has no idea of wants going wrong and does not want to hear anything that disagrees with current mindset.
you are checking an sqlcode with an 88 level. are you sure that the 88 level is referencing a field that has been populated by your proc and returned to your module? |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
probably is not working at all .Check if it is picking up tha desired row before u r even going into the sproc.
further obvious Questions.....
I am trying to help... with the information I HAVE...
Please keep u r frustration to u r self... |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
probably u r fetch is not working at all .Check if it is picking up tha desired row before u r even going into the sproc.
further obvious Questions.....
I am trying to help... with the information I HAVE...
Please keep u r frustration to u r self... |
|
Back to top |
|
|
|