View previous topic :: View next topic |
Author |
Message |
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Thu Jul 19, 2007 6:47 am Post subject: Question regarding the Stored Procedure Call |
|
|
Hi,
I am facing a strange problem. This is the issue:
I have a program GETCNT01 which is a generic program to get the count of the records in the table. It is expecting a sequence number as input and giving back the count after executing a query.
I have a batch program UPDDTL01 which call the GETCNT01. This particular call is working fine.
I also have an SP UPDSP001 calling the same program. But it is giving SQL code=-805 in the GETCNT01 when it is executing the SQL statement.
I have a similar module GETCNT02 which is working perfectly when called from batch program as well as SP.
When I checked the SYSIB.SYSPACKAGE entries for the above two programs (GETCNT01&GETCNT02), for GETCNT02, I can find two entried but for GETCNT01 I can see only one entry.
Can some one help me with this issue.
Please let me know if more details are required.
Thanks,
Yugee |
|
Back to top |
|
|
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Thu Jul 19, 2007 7:05 am Post subject: |
|
|
Hi,
Some more info:
these are the entries in SYSIBM.SYSPACKAGE:
COLLID NAME
----------- ------------
CBTKTC02 GETCNT02
CSTKTC02 GETCNT02
CBTKTC02 GETCNT01 |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Thu Jul 19, 2007 7:10 am Post subject: |
|
|
Quote: |
But it is giving SQL code=-805 in the GETCNT01 when it is executing the SQL statement.
|
yugee,
-805 error is a Bind error . An application program attempted to use a DBRM or package 'location-name.collection-id.dbrm-name.consistency-token' that was not
found.
I think the issue is as to how you are calling pgm GETCNT01. Is it called dynamically or statically? If it is called statically then you need to re-compile the main pgm once again.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|