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: 1746
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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