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

How to Fix DB2 SQLcode=-805?


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pcoreddy

New User


Joined: 14 Mar 2007
Posts: 24
Location: Mysore

PostPosted: Fri Mar 30, 2007 3:33 pm
Reply with quote

How to solve the DB2 SQLcode -805

I am getting SQL error code -805 when i am running the COBOL DB2 program

plz can anyone help how can i solve it
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 30, 2007 3:47 pm
Reply with quote

Your reason code for a more specific answer.

Quote:
An application program attempted to use a DBRM or package 'location-name.collection-id.dbrm-name.consistency-token' that was not found.

Collection id is blank ('location-name..dbrm-name.consistency-token') if the CURRENT PACKAGESET special register was blank for the local program execution.

The REASON token is blank if the length of 'location-name' is 16, the length of 'collection-id' is 18, and the length of 'dbrm-name' is 8 due to the length of SQLERRMT.
Back to top
View user's profile Send private message
pandey_nitin78

New User


Joined: 08 Aug 2005
Posts: 7

PostPosted: Fri Mar 30, 2007 6:18 pm
Reply with quote

-805 shows Bind problem, Please rebind your program in the correct instance and make sure you give the correct DBRM library name so that your bind JCL picks up DBRM from there.

Check here for -805 error:
/references/a2.html
Back to top
View user's profile Send private message
Shobana Bhaskar

New User


Joined: 02 Mar 2007
Posts: 35
Location: Pennsylvania, US

PostPosted: Thu Apr 05, 2007 6:10 pm
Reply with quote

Check whether the plan given in JCL is same as the one you bind with your program. Suppose if you bind plan that updates database and ve used the one that just fetches from database, then this conflict would return -805.
Back to top
View user's profile Send private message
letmeknow

New User


Joined: 10 Dec 2005
Posts: 5
Location: chennai

PostPosted: Mon Apr 30, 2007 9:15 pm
Reply with quote

Check whatever DBRM modules requires for your program are included in the PLAN or not. If not include all the DBRM'S required and REBIND it.
Back to top
View user's profile Send private message
nayaksidd

New User


Joined: 22 May 2007
Posts: 16
Location: bangalore

PostPosted: Thu May 24, 2007 4:36 pm
Reply with quote

Hi all,

I am posting the error which I am getting while running the jcl afetr compilation of my application.I have tested all the possible steps to resolve -805 its like:

1)deleting dbrm and loadlib
2)pointing directly to production loadlib
3)chk the run jcl

following error i am getting=>>>>>

Code:
DSNT408I SQLCODE = -805, ERROR:  DBRM OR PACKAGE NAME DB2DFMR.FPD4COL01.PSPL85
0.17E5DF92007E840F NOT FOUND IN PLAN
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu May 24, 2007 8:08 pm
Reply with quote

Hello and welcome to the forums,

A couple of suggestions. . .

First, when you post a question (even if it is similar to an existing topic), please start a new topic.

Next, please read the previous discussion in this topic. Your error is most likely caused by a bind problem or naming the wrong plan when you execute. It may help to talk with your database support people.

Good luck and we're here for followon questions icon_smile.gif
Back to top
View user's profile Send private message
Vishwamurthy

New User


Joined: 11 Mar 2008
Posts: 57
Location: India

PostPosted: Wed Dec 14, 2011 5:07 pm
Reply with quote

SQLCODE -805 in DB2 indicates that a required package was not found. Specifically, it means the application program attempted to use a DBRM (Database Request Module) or package that is not available at runtime.


The error message for SQLCODE -805 is typically as follows:

Code:
SQLCODE -805, SQLSTATE 51002, MESSAGE: DBRM or package name location-name.collection-id.dbrm-name.consistency-token not found in plan plan-name. Reason reason-code

DBRM or package name: Identifies the DBRM or package that could not be found.
Location-name: The location where the package was expected to be found.
Collection-id: The collection identifier for the package.
DBRM-name: The name of the DBRM.
Consistency-token: A token used to ensure that the correct version of the package is used.
Plan-name: The name of the application plan being executed.
Reason code: Additional information about the error.

Common Causes of SQLCODE -805
Package Not Bound: The package was not bound to the DB2 database.
Package or DBRM Name Mismatch: There is a mismatch between the name of the DBRM or package and what is expected by the plan.
Consistency Token Mismatch: The consistency token in the DBRM does not match the package in the database.
Missing Collection: The collection containing the package was not specified or is incorrect.
Plan Not Updated: The application plan does not include the package.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts SQLCODE=-204 SQLSTATE=42704 DB2 4
Search our Forums:


Back to Top