Timestamp error



IBM's flagship relational database management system

Timestamp error

Postby s.jain416 » Thu Sep 30, 2010 10:48 am

H ALWNULL(*USRCTL)
H CVTOPT(*VARCHAR)
H DATEDIT(*YMD)
H FIXNBR(*ZONED : *INPUTPACKED)
H OPTION(*NODEBUGIO)
H SRTSEQ(*LANGIDSHR)
D********************************************************************
D* Work Fields
D* -----------
D DFTDTTM S Z INZ(Z'0001-01-01-00.00.00.000000')
D********************************************************************
C DFTDTTM DSPLY
C/EXEC SQL
C+ INSERT INTO MULTITMP1 (ORG,LOGO,TOTAL,STARTTIME,ENDTIME)
C+ SELECT ORG,LOGO,count(*), :DFTDTTM, :DFTDTTM FROM ATRF
C+ GROUP BY ORG,LOGO
C+ ORDER BY ORG,LOGO
C+ WITH NC
C/END-EXEC
C Seton LR

In this code wat value STARTTIME,ENDTIME will give coa m getting only intialize value while i should get system date/timestamp value.

Kindly let me know wat vto do for this
s.jain416
 
Posts: 3
Joined: Thu Sep 30, 2010 9:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Timestamp error

Postby dick scherrer » Fri Oct 01, 2010 1:24 am

Hello,

You told the code to use the content of DFTDTTM - and it did. . .

If you want some other value, you need to place the new value in DFTDTTM rather than the initial value.

The duplicates have been locked. Do not post the same question in multiple topics. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post