View previous topic :: View next topic
|
Author |
Message |
elvisyesurajah
New User
Joined: 17 Mar 2022 Posts: 1 Location: India
|
|
|
|
Hi There!
I've been working on a project where I've to call a COBOL DB2 batch module from a COBOL DB2 Stored Procedure. I've been getting SQLCODE -927 during the runtime. I see the failure happens when the program encounters the first SQL statement in the called program.
Both the Stored Procedure and the Batch modules are bound in different schema. When I call this batch module from another batch module bound in a different schema, it works.
It would be great if the experts in this forum can provide me pointers to debug this issue further. Please let me know if you need more information. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
|
|
You can’t call as they resides in two different environments. Moreover Stored Procedures are for real-time use and quick responses and calling a batch module is defeating the sole purpose of it. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
The SP and its subroutine need to use the same Db2 attachment facility. Speak to your DBA. |
|
Back to top |
|
|
|