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

-805 SqlCode when accessing DB2 table


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

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Mon Mar 05, 2007 8:48 am
Reply with quote

Hi

I defined a new program and transaction in CICS. I installed the group also. I tried to execute the program online and I keep getting -805 error when trying to access a DB2 table.

However, the same program when run in batch mode runs successfully.

Is there any special entries need to be made in a table so that CICS-DB2 program can execute successfully???

The new program I wrote has compiled, bound and linked successfully....

Has anyone faced the same problem???

Please do help....
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Mar 05, 2007 11:31 am
Reply with quote

Hi Soumya,

These could be the possible reasons for the error

An attempt was made to execute the application program 'location name.collection id.program name.consistency token' (this token can be 'location name..program name.consistency token' if the current package set special register is blank for the local program execution) that has not been found due to one or more or the following reasons:
* The program 'program name' has not been bound as the member part of the application plan 'plan name'
or
* The 'collection id' in the PKLIST was not correct when the application plan 'plan name' was bound
or
* The current package set special register was not set correctly
or
* The 'location name' in the CURRENTSERVER was not correct when the application plan 'plan name' was bound,
or
* The application was not connected to the proper location
or
* The location id in the package list was not correct when the application 'plan name' was bound
or
* The DBRM of the version of the application program being executed was not bound.

Please Check the same while you are executing the program.

Regards
Amar
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Mar 05, 2007 11:35 am
Reply with quote

For those reasons you can step as following respctively to correct the error. These solutions are related to the reasons respectively.you have to apply the solution for the respective reason if you find any in above reasons.

* Bind the program 'program name' as the member part of the application plan 'plan name'

or

* Correct the collection id in the PKLIST and bind the application plan 'plan name'

or

* Set the current package set special register correctly

or

* Put the correct 'location name' in the CURRENTSERVER of the BIND command and bind the application plan 'plan name'

or

* Connect to the correct RDB name

or

* Correct the location id in the PKLIST and bind the application plan 'plan name'

or

* Bind the DBRM of the version of the application program to be executed
Back to top
View user's profile Send private message
devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Mon Mar 05, 2007 1:04 pm
Reply with quote

hi this erro code may sometimes come due to not matching the TIMESTAMP
i mean whe nyou combine the DBRM AND LOAD module.
it first check for the TIMESTAMP mean wether this DBRM is of the same program. ifyes it execute otherwise gives error.
-855.
so please check first wehter you are usingthe correct DBRM for your program in JCL..

let me know if you sovled the problem.
Back to top
View user's profile Send private message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Mon Mar 05, 2007 1:39 pm
Reply with quote

For compilation we use compilation tool which automatically does the binding and linking the load module to CICS.

There are no compilation error and the bind process is succesfull..The same program executes succesfully in batch mode...In CICS, its giving -805 SQL error.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Mar 05, 2007 8:43 pm
Reply with quote

all you need to do in CICS is issue a NewCopy for the program after it was compiled.
Back to top
View user's profile Send private message
zensa

New User


Joined: 21 Feb 2007
Posts: 10
Location: India

PostPosted: Thu Mar 15, 2007 4:38 pm
Reply with quote

Hi,

The Bind may be successful, but may be the DBRMLIB load & the CICS LOAD are not matching.

Please check your CICSLOAD library & the DBRM library for the same Program load.
Back to top
View user's profile Send private message
TG Murphy

Active User


Joined: 23 Mar 2007
Posts: 148
Location: Ottawa Canada

PostPosted: Mon Mar 26, 2007 11:22 pm
Reply with quote

Where I work, the SQLCODE -805 almost always happens due to 1 of the following reasons.

1. The DB2 PLAN that your transaction executes under does not have access to the DB2 COLLECTION that contains the DB2 package you are trying to execute. Fix this problem by adding the missing collection to your plan.

2. The JCL LOADLIB or STEPLIB statement is missing the library where the SQL load module resides. This problem typically happens in batch.

3. The DB2 package you are trying to use has gone missing. Often times this problem can be fixed simply by recompiling/rebinding your SQL module.
Back to top
View user's profile Send private message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Tue Mar 27, 2007 12:23 am
Reply with quote

Try newcopying it
Back to top
View user's profile Send private message
senthilssg

New User


Joined: 09 Dec 2005
Posts: 64
Location: USA

PostPosted: Mon Apr 02, 2007 8:19 pm
Reply with quote

Hi ,


Try to issue following Command to take CICS to take new copy from LOAD Library rather than use old copy in memory


Code:
CEMT SET PROG(program-name) NEW


"Correct me If I am wrong"

Thanks and Regards
Senthil
Back to top
View user's profile Send private message
vikramsreddy

New User


Joined: 03 Sep 2006
Posts: 7
Location: Chicago, USA

PostPosted: Thu Jul 16, 2009 7:00 am
Reply with quote

Soumya, I was looking for a similar problem today and found this page

Resolution:
I have a manual compile and Bind for the program I was having the -805 error in. All the while I was getting a Zero return code for the Bind. When I had a closer look, I found that I was using a DBRMLIB and LOADLIB from different regions. The DBRM and LOAD Libraries should match in the compile and Bind JCLs. I am sure it will work.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jul 16, 2009 7:22 am
Reply with quote

Hello and welcome to the forum,

Please note that ssowmya posted the question more than 2 years ago.

There may not be a lot of activity now icon_smile.gif

Enjoy the forum,

d
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Jul 16, 2009 9:33 am
Reply with quote

Dick...
Its too late to welcome Vikram into the forum also...
He joined 3 years back... icon_rolleyes.gif ... 2 months before you... icon_razz.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jul 16, 2009 9:39 am
Reply with quote

Hello,

Quote:
Its too late to welcome Vikram into the forum also...
Never too late to welcome someone. . . But Vikram has only been "lurking" icon_smile.gif

I try to mention it when i see someone's first post regardless icon_wink.gif

d
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Jul 16, 2009 9:50 am
Reply with quote

icon_lol.gif

will surely keep this in mind the next time i see you welcome someone into the forum... icon_biggrin.gif
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top