Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

-805 while calling cobol module from stored procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: -805 while calling cobol module from stored procedure
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: 1771
Location: Bloomington, IL

PostPosted: Wed Apr 18, 2012 4:09 pm    Post subject:
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    Post subject: Reply to: -805 while calling cobol module from stored proced
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us