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

SQLCODE -805 - Non DB2 Batch Program calling DB2 routine


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

New User


Joined: 07 Mar 2007
Posts: 11
Location: Milton Keynes

PostPosted: Fri Jul 20, 2007 7:55 pm
Reply with quote

Hello everybody,

First of all, congratulations for such a nice and useful forum, I have been able to solve many issues going through the posts but I haven't been able to solve this one although I was able to find a few things regarding this issue but none of the has helped me.

Well, I have a non-DB2 batch program that per record read, calls up a DB2 routine to obtains for a customer all the accounts.

The first 15 records runs well, no problems at all, but when it reaches the 16th record, the program will abend with an SQLCODE=-805. After looking to the SQLCODE manual, we had requested our DBA's to rebound the plan for the batch program and also the plan for the routine but nothing....

I have verified the plan for the batch program and the routine is contained in the plan....

I could use some help.... it is very confusing....

Thanks again and congratulations for such a great forum!!!!

Leo
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Sat Jul 21, 2007 1:48 am
Reply with quote

Have you tried creating a new input dataset without the 16th record and running it?

Do you have any debugging tools, such as Expediter?

If so, trace the program execution and see what is happening on the 16th iteration that is different from the previous 15. The 16th must be doing unique. DB2 modules just don't disappear in the middle of execution! OK, they shouldn't disappear in the middle of an execution....
Back to top
View user's profile Send private message
Sandry

New User


Joined: 02 May 2006
Posts: 3

PostPosted: Sat Jul 21, 2007 11:43 am
Reply with quote

Is the first 15 records read from a dataset or is that too from table(database)
Back to top
View user's profile Send private message
insomniaa

New User


Joined: 07 Mar 2007
Posts: 11
Location: Milton Keynes

PostPosted: Mon Jul 23, 2007 11:08 pm
Reply with quote

Hello all,

It doesn't matter what information is within the record number 16th... it will get the same SQLCODE.... and it always happens in the 16th record when the routine tries to open the cursor....

I have been talking with our DBA's and it seems that the plan was bound with a different load program than the one used for execution... but still does not answer why is this happening with the 16th record.... and not with the first one....

Thanks for the response.... if we find the solution i will post it here....

Any advice will be helpful!!!!

Regards
Leo
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Mon Jul 23, 2007 11:54 pm
Reply with quote

I may have misunderstood you, but are you saying that the cursor isn't opened until the 16th record and that the first 15 do NOT open the cursor?
Back to top
View user's profile Send private message
insomniaa

New User


Joined: 07 Mar 2007
Posts: 11
Location: Milton Keynes

PostPosted: Wed Jul 25, 2007 2:02 pm
Reply with quote

Hi all,

Thanks for the answers... i have finally found the answers and it seems that the batch program was also connecting to our UDB database but never closing it therefore when read the next record and tried to open the cursor on the DB2 database, the system tried to open the cursor of a table on the wrong database thus receiving this -805....

Thanks!!!
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 Using API Gateway from CICS program CICS 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top