IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

-805 while calling cobol module from stored procedure


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sharad_shanu

New User


Joined: 03 Oct 2006
Posts: 40

PostPosted: Wed Apr 18, 2012 3:37 pm
Reply with quote

Hi all,

I have a stored procedure A1 which is calling another cobol module (not sp) B1. Module B1 is being called several times from A1.

(A) First call, we pass input parameter to B1. Inside B1, values are fetched from a table on the basis of input parameters and stored into a global temp table. Then a cursor is opened on that temp table.

(B) Next we call B1 several times to fetch cursor values (which was opened in last call) one by one. However this time we are getting -805 sqlcode.

Please note we successfully completed step (A) but facing issues in step (B). The error details are as follows:

SQLCODE = -805
SQLSTATE = 51002
ERROR: DBRM OR PACKAGE NAME DB81.PAAALS00.EDBCC10B.192BD91A0F6B0B8C NOT FOUND IN PLAN AAA2MAIN. REASON 03

Note: EDBCC10B is the name of called module. AAA2MAIN is the main calling program.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Apr 18, 2012 4:09 pm
Reply with quote

Start by looking here to determine why you might get SQLCODE -805 for reason 03.
Back to top
View user's profile Send private message
Gary Rose

New User


Joined: 13 May 2014
Posts: 2
Location: USA

PostPosted: Wed Jun 04, 2014 1:46 am
Reply with quote

Just an FYI.., I had the same message in my program. I had 6 different files to run through my program.., 3 worked and 3, I was getting the 805-. The solution for my abend was to put a dummy query in my initialization to take the first query away from the called module. In the three files that worked, my program was doing the first query. For the three that failed, the called program was doing the first query. The thing is.., the called program came back with a good return (data and all) and then my program failed the first query I did on a table. If someone can tell me why the driver has to do the first query, I'd like to hear it..
Thanks.., icon_confused.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top