Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Calculate TIME difference after reading 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Fri May 25, 2007 6:45 pm    Post subject: Calculate TIME difference after reading 2 files
Reply with quote

I have to find difference between two times that are in HHMMSS

TIMEA-TIMEB

TIMEA WE WILL GET FROM FILE1 WHICH IS SAME ALL THE TIME SAY 11:36:24


TIMEB WE WILL GET FROM THE OTHER FILE IN WHICH ALL THE TIMES ARE DIFFERENT SAY
09:00:00
09:10:00
10:00:00
10:12:34


SO WE REQUIRE TO SUBTRACT TIMEB FROM TIMEA
AS LIKE THIS
Code:
TIMEA     - TIMEB        = TIMEC
11:36:24  - 09:00:00     = 02:36:24
          - 09:10:00     = 02:26:24
          - 10:00:10     = 01:36:14
          - 10:12:34     = 01:23:50


WE HAVE TO MOVE TIMEC TO ARRAY SO THAT IT CAN BE MOVED TO TABLE
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 25, 2007 7:06 pm    Post subject:
Reply with quote

Hello,

Convert the time hh.mm.ss to seconds only. Perform the calculation and convert back to hh.mm.ss.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri May 25, 2007 7:35 pm    Post subject:
Reply with quote

Or use base60 math.......
Back to top
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Sat May 26, 2007 12:25 am    Post subject:
Reply with quote

I think any one of the above is fine.. if you checking for time differance in the same region (i mean time zone)
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us