View previous topic :: View next topic
|
Author |
Message |
veenus
New User
Joined: 09 Aug 2005 Posts: 2
|
|
|
|
hi
Hi,
i need to calculate the timestamp differece in hours
say 72 hours i have written like this but it is not functioning
EXEC SQL
SELECT
HOURS(CURRENT TIMESTAMP)- HOURS(P1-TIMESTAMP)
INTO
:WS-HOURS
FROM SYSIBM.SYSDUMMY1
END-EXEC
IF WS-HOURS >= 72
MOVE 16 TO RETURN CODE
ELSE
MOVE 00 TO RETURN CODE
END-IF.
thanks in advance
veenus |
|
Back to top |
|
|
jagadeshdvn
New User
Joined: 27 Jun 2005 Posts: 12 Location: East Hartford
|
|
|
|
Hi Dude,
Try using this:
SELECT HOUR(CURRENT TIMESTAMP)- HOUR(CURRENT TIME)
FROM SYSIBM.SYSDUMMY1
But I am not sure if it takes min & sec into consideration. Please do try & let me now. |
|
Back to top |
|
|
veenus
New User
Joined: 09 Aug 2005 Posts: 2
|
|
|
|
Hi Jagadeesh,
i did what u said,
when staging it showing macc=4
when promoting it showing macc=4
& macc=0
when running the jcl it is showing macc=o
even if it exceeds 72 hours ie it is exceeding the hoursn limit
so i think the logic is not correct
it is not caluculating the hours
Thanks in advance
regards
pratap |
|
Back to top |
|
|
|