Difference between two timestamps fields using sort



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

Difference between two timestamps fields using sort

Postby praveen_nayak17 » Wed May 27, 2009 3:29 pm

:?: Hi All,

Could anyone help me in calculating the difference between two timestamp(26 char) fields in input file.

Sample input file record
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456

Thank you,
Praveen Nayak
praveen_nayak17
 
Posts: 8
Joined: Thu Jan 15, 2009 11:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between two timestamps fields using sort

 

Re: Difference between two timestamps fields using sort

Postby arcvns » Wed May 27, 2009 9:11 pm

Why dont you post a few sample records and the expected output from it?
Arun
User avatar
arcvns
 
Posts: 55
Joined: Sat Feb 28, 2009 12:36 am
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between two timestamps fields using sort

Postby praveen_nayak17 » Wed May 27, 2009 11:45 pm

Sample input file records
Field 1 Field 2
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456

expected output file records
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456 ( field1-field2)
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456 ( field1-field2)


Thank you
Praveen Nayak
praveen_nayak17
 
Posts: 8
Joined: Thu Jan 15, 2009 11:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between two timestamps fields using sort

Postby dick scherrer » Thu May 28, 2009 1:07 am

Hello,

Now, please post the actual expected output - not the formula. . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Difference between two timestamps fields using sort

Postby praveen_nayak17 » Fri May 29, 2009 12:14 am

expected output file records
field1                          field2                                    field2-field1
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456  0000-00-00-04.00.00.123456
2009-05-25-01.00.00.000000 2009-05-25-05.00.00.123456  0000-00-00-04.00.00.123456
praveen_nayak17
 
Posts: 8
Joined: Thu Jan 15, 2009 11:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between two timestamps fields using sort

Postby Alissa Margulies » Fri May 29, 2009 12:18 am

SyncSort does not currently have the facility to perform arithmetic on date/time fields.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post