Contoken -- DBRM timestamp ?

Johnson Dang

Contoken -- DBRM timestamp ?
Hi all,

I looked for some explanation about the relation between CONTOKEN and DBRM
timestamp but I didn't find any good document to clarify that.

1. Does anybody know how the DBRM timestamp convert to CONTOKEN in DB2 ?
How does DB2 resolve it with the daylight savings ?

2. Do you know any link referred to it ?



We are in DB2 VERSION 7.1, z/OS 1.4

Thanks in advance,



---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Mike Bell

Re: Contoken -- DBRM timestamp ?
(in response to Johnson Dang)
The contoken is a shifted STCK format - look in the principles of operation
manual for discussion of STCK instruction and format. SA22-7832-03 is the
most current version but the STCK instruction goes back to the beginning of
360 history.

STCK format is based on CPU time which is normally GMT and then converted to
display format. I don't know how the daylight savings changes work - The
MVS manuals describe how the date and time is handled in Z/os. DB2 just uses
the date/time functions from MVS.

The CONTOKEN is the source and the other fields are derived from that.

If you pass a char(8) field to the TIMESTAMP function, it will assume it is
in STCK format and return a generated date/time to match. If you try to use
a CONTOKEN field in timestamp function, it will return a shifted version of
the precompile date/time.


Mike Bell
HLS Technologies
-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf
Of Dang, Tho
Sent: Thursday, April 21, 2005 12:39 PM
To: [login to unmask email]
Subject: [DB2-L] Contoken -- DBRM timestamp ?

Hi all,

I looked for some explanation about the relation between CONTOKEN and DBRM
timestamp but I didn’t find any good document to clarify that.

1. Does anybody know how the DBRM timestamp convert to CONTOKEN in DB2 ?
How does DB2 resolve it with the daylight savings ?

2. Do you know any link referred to it ?



We are in DB2 VERSION 7.1, z/OS 1.4

Thanks in advance,


----------------------------------------------------------------------------
----- Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page
select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences at
http://conferences.idug.org/index.cfm


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005


---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Roger Miller

Re: Contoken -- DBRM timestamp ?
(in response to Mike Bell)
Part of the reason that you don't find a description is that this is not
an external. I like to discourage use of internals, since the techniques
and information are not reliable. There are a couple of situations where
the classic description is not accurate, such as use of the LEVEL
precompiler option.

Also, if we need to make a change for any reason, such as fixing a bug or
extending the function, we will, without any notice. When you use an
internal and something breaks, then you get to keep the pieces or try to
fix it.

Roger Miller

On Thu, 21 Apr 2005 13:10:13 -0500, Mike Bell <[login to unmask email]>
wrote:

>The contoken is a shifted STCK format - look in the principles of
operation
>manual for discussion of STCK instruction and format. SA22-7832-03 is the
>most current version but the STCK instruction goes back to the beginning
of
>360 history.
>
>STCK format is based on CPU time which is normally GMT and then converted
to
>display format. I don't know how the daylight savings changes work - The
>MVS manuals describe how the date and time is handled in Z/os. DB2 just
uses
>the date/time functions from MVS.
>
>The CONTOKEN is the source and the other fields are derived from that.
>
>If you pass a char(8) field to the TIMESTAMP function, it will assume it
is
>in STCK format and return a generated date/time to match. If you try to
use
>a CONTOKEN field in timestamp function, it will return a shifted version
of
>the precompile date/time.
>
>
>Mike Bell
>HLS Technologies
>-----Original Message-----
>From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf
>Of Dang, Tho
>Sent: Thursday, April 21, 2005 12:39 PM
>To: [login to unmask email]
>Subject: [DB2-L] Contoken -- DBRM timestamp ?
>
>Hi all,
>
>I looked for some explanation about the relation between CONTOKEN and DBRM
>timestamp but I didn’t find any good document to clarify that.
>
>1. Does anybody know how the DBRM timestamp convert to CONTOKEN in DB2 ?
>How does DB2 resolve it with the daylight savings ?
>
>2. Do you know any link referred to it ?
>
>
>
>We are in DB2 VERSION 7.1, z/OS 1.4
>
>Thanks in advance,
>

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm