View previous topic :: View next topic |
Author |
Message |
JAMSHIDA Beginner
Joined: 03 Aug 2004 Posts: 2 Topics: 1
|
Posted: Tue Aug 03, 2004 1:15 am Post subject: DB2 Stored procedure and dynamic sql. |
|
|
Hi,
I am facing some problem while testing the stored procedure.
I have coded a stored procedure with dydnamic sql. I am invoking the
stored procedure from a driver program which is a cobol batch program
with one exec call statement to invoke the stored procedure.
Both stored procedure and driver program are compiled through changeman.
When we executed the driver program , the stored procedure is not getting invoked. All the cobol statements before and after the call statement in the driver program is getting executed and the return code is zero.
I displayed the sqlcode after the call.
I got the following error message:
DSNT408I SQLCODE = -981, ERROR: THE SQL STATEMENT FAILED BECAUSE THE RRSAF COL OPERATIONS, REASON 00C12216
DSNT418I SQLSTATE = 57015 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNARA00 SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 0 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF'
X'00
MATION
The explanation for the above sql code is as follows
Explanation: The application program issued an SQL or IFI function request without a DB2 connection. SQL or IFI requests cannot be issued until IDENTIFY, SIGNON and CREATE THREAD processing have been completed.
We assume it is because of the DB2 connect problem.
But all the manuals say an explicit DB2 Connect is not required in a stored procedure.
Please let us know if there are any alternate solution for this.
Any help on this will be appreciated.
Thanks in advance!
- Jamshida. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
JAMSHIDA Beginner
Joined: 03 Aug 2004 Posts: 2 Topics: 1
|
Posted: Tue Aug 03, 2004 6:04 am Post subject: |
|
|
Hi Kolusu,
Thanks for the reply.
Please let us know if you are aware of any solution to rectify this problem other than issuing DB2 Connect.
Thanks and regards,
Jamshida |
|
Back to top |
|
 |
|
|