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

How we can resolve the timestamp error in DB2?


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

New User


Joined: 16 Apr 2007
Posts: 49
Location: Pune

PostPosted: Mon Nov 10, 2008 12:19 pm
Reply with quote

Hi,

Please let me know the answer that how we can resolve the timestamp error in DB2?
Back to top
View user's profile Send private message
n_sri_vas

New User


Joined: 17 Nov 2006
Posts: 6

PostPosted: Mon Nov 10, 2008 12:27 pm
Reply with quote

just precompile it once again and be sure the Consistency tokens of Load module and DBRMLIB are same
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 10, 2008 1:19 pm
Reply with quote

would not one want to re-bind, also?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 10, 2008 1:20 pm
Reply with quote

Pre-compiling will not create a load module, need to go thru the compile and link step.
Back to top
View user's profile Send private message
tarun_bhardwaj

New User


Joined: 18 Jul 2003
Posts: 39
Location: delhi

PostPosted: Mon Nov 10, 2008 2:13 pm
Reply with quote

First of all, which SQL error code are you talking about ? the -805 of -181 ? Both of them need a different treatment.
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Mon Nov 10, 2008 2:28 pm
Reply with quote

Tarun,

-805 is not related to Timestamp error.

-818 Timestamp mismatch or
-180/-181 Bad data in Date/Time/Timestamp
Value for DATE, TIME, TIMESTAMP is invalid
Back to top
View user's profile Send private message
tarun_bhardwaj

New User


Joined: 18 Jul 2003
Posts: 39
Location: delhi

PostPosted: Mon Nov 10, 2008 2:31 pm
Reply with quote

KSK,

I know that but the responses that have been posted to the original query have been talking about mismatched consistency token (which has to do with -805). Thats why we first need to know the exact SQL error code that Amol is facing.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 10, 2008 3:03 pm
Reply with quote

tarun_bhardwaj,

good catch. I am glad you were persistant with your statements.

another example of posters trying to help when the original question is poorly worded.
Back to top
View user's profile Send private message
Amolondhe007
Warnings : 1

New User


Joined: 16 Apr 2007
Posts: 49
Location: Pune

PostPosted: Mon Nov 10, 2008 4:07 pm
Reply with quote

Tarun,

I'm talking about -818 timestamp error.

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 10, 2008 4:23 pm
Reply with quote

your host variable is not a valid timestamp. fix it.

if you are unable to do so, or it is not that simple,
would help us if you would supply your sql,
please use code/code tags
ibmmainframes.com/faq.php?mode=bbcode
Back to top
View user's profile Send private message
Amolondhe007
Warnings : 1

New User


Joined: 16 Apr 2007
Posts: 49
Location: Pune

PostPosted: Mon Nov 10, 2008 4:43 pm
Reply with quote

Hi Dick,

Could you please explain with the example if you have. Is there any other solution to resolve this?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 10, 2008 5:06 pm
Reply with quote

Amol,

your sql (which you did not provide) references
  • a host variable which DB2 has decided should contain a timestamp. The value contained in your host variable is not a valid timestamp.
  • a function generated timestamp which, when resolved, is not a valid timestamp.


if you would supply your sql, we could probably tell you which host variable is in error.
If you would supply the values contained in your host variables, our guesses would 'probably' be more exact.
Your SQL would be a very good example to start with.
Back to top
View user's profile Send private message
tarun_bhardwaj

New User


Joined: 18 Jul 2003
Posts: 39
Location: delhi

PostPosted: Mon Nov 10, 2008 5:14 pm
Reply with quote

You can go thru the folling links to resolve your problem

www.ibmmainframes.com/about621.html
www.ibmmainframes.com/viewtopic.php?t=2535&highlight=818

Best wishes,
Tarun
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Nov 10, 2008 6:39 pm
Reply with quote

Quote:

Tarun,

I'm talking about -818 timestamp error.

Thanks.
Dick,

Amol is facing sqlcode = -818 which explains the below reason.
Quote:
-818 THE PRECOMPILER-GENERATED TIMESTAMP x IN THE LOAD MODULE IS DIFFERENT FROM THE BIND TIMESTAMP y BUILT FROM THE DBRM z

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


But the discussion here seems to be about correcting the host variable/SQL. Confused icon_rolleyes.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 10, 2008 7:20 pm
Reply with quote

Arun,
confusion was created by me.

sorry,

your solution fits the problem.
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 Error to read log with rexx CLIST & REXX 11
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top