Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
timestamp difference in hours

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
veenus

New User


Joined: 09 Aug 2005
Posts: 2

PostPosted: Tue Aug 09, 2005 1:21 pm    Post subject: timestamp difference in hours
Reply with quote

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
View user's profile Send private message

jagadeshdvn

New User


Joined: 27 Jun 2005
Posts: 12
Location: East Hartford

PostPosted: Wed Aug 10, 2005 3:06 am    Post subject: Re: timestamp difference in hours
Reply with quote

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
View user's profile Send private message
veenus

New User


Joined: 09 Aug 2005
Posts: 2

PostPosted: Wed Aug 10, 2005 11:03 am    Post subject: Re: timestamp difference in hours
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
This topic is locked: you cannot edit posts or make replies. UTC Timestamp Log Thangavel COBOL Programming 5 Mon Jan 22, 2018 9:04 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us