Adding Time fields



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Adding Time fields

Postby ibmmf4u » Mon May 28, 2012 1:15 am

Hi Everyone,

My requirement goes this way. I would like to add two time fields present in two different files based on join key present in both the files. And would like to move the resultant obtained as per the match keys into an other file and the one that doesn't match with the file2 into one more file. Below mentioned is an example of the same.

File1:-
TEST1     23:53:02
TEST2     22:10:02
TEST3     20:08:02
TEST4     21:09:04



File2:-
TEST1    00:07:58
TEST2    00:08:58
TEST3    00:09:58
TEST5    00:10:58


Where in the File1 contains the time in 24hr format and File2 just contains only mins and sec's basically the time i.e to be added. The output files should be displayed below.

Match file:-
TEST1   00:01:00
TEST2   22:19:00
TEST3   20:18:00


Unmatch file:-


Can some kindly provide me the sort card in achieving the above.
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Adding Time fields

Postby dick scherrer » Mon May 28, 2012 7:17 am

Hello,

What should happen when the times are 2 daya apart?

What should happen when dat2 is less that date one (due to some error).

Once you have defined all of the rules (we can't do this as they are your local rules), suggest you convert the values to seconds, subtract, and convert the result back to (dd?) hh mm ss.

If you get stuck creating the "sort card" post what you have tried and where you are stuck. Soneome shouldbe able to help.
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 Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post