Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1789
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 COBOL - Array result in single variab... vinu78 COBOL Programming 3 Thu Feb 20, 2020 5:29 pm
No new posts Dynamic cursor name in Cobol program Jlevine COBOL Programming 1 Fri Feb 14, 2020 2:55 am
No new posts Indent cobol code Renato Zangerolami COBOL Programming 6 Thu Feb 13, 2020 12:53 am
No new posts Eliminating blank space in XML parsed... elixir1986 COBOL Programming 0 Tue Feb 11, 2020 4:41 am
No new posts I need help with analysis of a COBOL ... John Poulakos All Other Mainframe Topics 14 Fri Jan 24, 2020 9:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us