Page 1 of 1

Updating with Current Timestamp

PostPosted: Thu Feb 26, 2009 8:38 pm
by ninudvictor
Hi All,
I am trying to update a column(CARD_TS,26 bytes length) of a table with Current Timestamp from a Cobol program
by calling a subprogram which has the required query to update the table.

I am using "FUNCTION CURRENT-DATE" (21 BYTES) which gives timestamp like "200902260845+0000".
The last 5 bytes is always "+0000".
But DB2 Current Timestamp gives "2009-02-26.08.45.55.000000" (26 bytes).
[YYYY-MM-DD.HH.MM.SS.mili secs]

Could anyone please let me know how to update the CARD_TS column with 26 bytes current timestamp
including the last 6 bytes which is vital for business requirement.

As it is a client standard to use the sub program,I can not update the column using DB2 CURRENT TIMESTAMP in embeeded SQL.
So please tell me the way how to do it through a cobol program.

Regards
Ninu

Re: Updating with Current Timestamp

PostPosted: Thu Feb 26, 2009 8:43 pm
by ninudvictor
But DB2 Current Timestamp gives "2009-02-26.08.45.55.123456" (26 bytes).
[YYYY-MM-DD.HH.MM.SS.mili secs]
The last 6 bytes is Milli Seconds which continuously changes but Cobol Function Current Date's
last 5 bytes is constant "+00000". What does this "+" signify?