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
 

 

Regarding Sqlcode -818

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Suthandira

New User


Joined: 06 Apr 2005
Posts: 10

PostPosted: Fri Apr 08, 2005 12:17 pm    Post subject: Regarding Sqlcode -818
Reply with quote

Hi,

In Which Situation -818 will occur? How to rectify that?

Thanks in advance.

Devi.
Back to top
View user's profile Send private message

Niteshs

New User


Joined: 24 Mar 2005
Posts: 6

PostPosted: Fri Apr 08, 2005 12:23 pm    Post subject: Re: Regarding Sqlcode -818
Reply with quote

Its a timestamp mismatch .please precomplie,link edit and re bind the program once again
Back to top
View user's profile Send private message
aishwarya_singh

New User


Joined: 06 Apr 2005
Posts: 21

PostPosted: Fri Apr 08, 2005 12:29 pm    Post subject: Re: Regarding Sqlcode -818
Reply with quote

Hi Suthandira,

When the DB2 COBOL program is run then during runtime the load module starts up and hits all the SQL codes calls in the cobol program which were separated at the time of precompiling. And this Call invokes the COBOL-DB2 interface program, which connects to DB2.If the runtime code necessary to execute your SQL isn't currently resident inside the DB2, then it will go to the buffer pool assigned to DB2 directory and look collections named in the PLAN for the package with the same name.

IF you don;t find it there also then you will get -818 error code and sometimes -805 code also.

To rectify this you should confirm that the SQL code written in the cobol program is resident inside the DB2 or not..i.e. you should confirm this during precompilation that whether it is done properly or not.
Back to top
View user's profile Send private message
Suthandira

New User


Joined: 06 Apr 2005
Posts: 10

PostPosted: Fri Apr 08, 2005 12:39 pm    Post subject: Re: Regarding Sqlcode -818
Reply with quote

Hi Aishwarya,

Thanks , but

I read from one material as follows

When -818 occurs u have to supply the foll query


Select hex(contoken) from sysibm.syspackage


where package name = 'name'.

But after this what i have to do?
Back to top
View user's profile Send private message
aishwarya_singh

New User


Joined: 06 Apr 2005
Posts: 21

PostPosted: Fri Apr 08, 2005 12:51 pm    Post subject:
Reply with quote

Yes, in the package only the SQL code information+ access path will be avalable so you have to supply this and run the program again.

Please tell anybody if this is right.
Back to top
View user's profile Send private message
aishwarya_singh

New User


Joined: 06 Apr 2005
Posts: 21

PostPosted: Fri Apr 08, 2005 2:05 pm    Post subject:
Reply with quote

Sorry,This is the exact answer for SQLcode-818. It means that the consistency token in the DBRM and Loadmodule are different. hence for resolving that you have to precompile again the program and then compile and run.I suppose the consistency token is related to the TIMESTAMP which may be different.
Back to top
View user's profile Send private message
Pushpak

New User


Joined: 06 May 2005
Posts: 18

PostPosted: Tue May 17, 2005 3:58 pm    Post subject: Re: Regarding Sqlcode -818
Reply with quote

Hi

-818 - Means timestamp mismatch. CONTOKEN for your DBRM is not matching with the CONTOKEN generated by precompiler.

If your package is directly taggling with plan & you are very sure that u have compiled your package properly, then u have to use correct DB2 load library in your jcl to resolve -818.

One very comman reason of -818 is "Attempting to run against a test
subsystem, using the prod ligrary, or vice versa."

If you are using Package - Collection - Plan concept .. then there might be different soln to resolve -818 / -805

Pushpak
Back to top
View user's profile Send private message
Pushpak

New User


Joined: 06 May 2005
Posts: 18

PostPosted: Tue May 17, 2005 4:51 pm    Post subject: Re: Regarding Sqlcode -818
Reply with quote

Hi,

Please also check out link

http://ibmmainframes.com/viewtopic.php?t=2535&highlight=bind"

for more info of -818.

Pushpak.
Back to top
View user's profile Send private message
Ganesh K Rajan

New User


Joined: 13 May 2005
Posts: 7

PostPosted: Wed May 18, 2005 12:58 pm    Post subject: Re: Regarding Sqlcode -818
Reply with quote

Reason of this Error:

THE PRECOMPILER GENERATED TIMESTAMP x IN THE LOAD MODULE IS DIFFERENT FROM THE BIND TIMESTAMP y BUILT FROM THE DBRM z

Description :

The SQL precompiler places timestamp 'y' in the DBRM, and time stamp 'x' in the parameter list in the application program for each SQL statement. At BIND time, DB2 stores the DBRM timestamp for run time use. At run time, timestamp 'x', for the SQL statement being processed,is compared with timestamp 'y' derived from the DBRM 'z' at BIND time. If the two timestamps do not match, the DBRM and the application program were not the result of the same precompile. This problem can occur if you: * Precompile, compile, and link, without doing a BIND of the application, * Precompile and BIND, without doing the compile and link for the application program, or * BIND the application using a DBRM that resulted from a different precompile of the application program than that which produced the object module that is linked into the application module. The timestamps 'x' and 'y' are DB2 internal timestamps. They do not have an external interpretation.

Action to Over come this Error:

BIND the application again, using the DBRM for the application program that matches the object module.

Rgs,
Ganesh
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 SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Need to understand SQLCODE = 12 rohanthengal DB2 3 Thu Nov 05, 2015 11:22 am
No new posts SQLCODE -922 in Batch-Cics program tr... kishpra CICS 2 Thu Sep 10, 2015 12:36 pm
No new posts SQLCODE -450 for stored procedure spoorni DB2 3 Fri Jan 16, 2015 2:45 am
No new posts -81 SQLCODE returned when Remote Stor... kameswaramanoj.Akella DB2 1 Wed Dec 03, 2014 5:36 am


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