Comparing TIMESTAMP in Sort



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Comparing TIMESTAMP in Sort

Postby sganja » Thu Jun 11, 2015 11:47 am

Hi All,

I am having a flat file as in below format where its holding a key value in first 10 bytes. For Each key value there will be chance of 1 or 2 Records followed by 99 series and 88 series. in some scenarios for a key field same time stamp got recorded which is creating issue while pulling based on ( key + timestamp ).

I want to filter out the records which key field is having same time stamp.

8888888888 9933333333 2012-02-17-08.12.05.671002
8888888888 8833333333 2012-02-17-08.12.05.671002
9999999999 9933333333 2012-02-18-07.11.08.123456
9999999999 8833333333 2011-02-18-07.11.08.123456
7777777777 9933333333 2012-02-17-00.12.05.671002
7777777777 8833333333 2010-02-17-00.12.05.671002
5555555555 9933333333 2012-02-20-00.12.05.671002
5555555555 8833333333 2012-02-20-00.12.05.671002
4444444444 9933333333 2012-06-20-06.30.05.543621
4444444444 8833333333 2013-06-20-06.30.05.543621
3333333333 8833333333 2011-06-20-06.30.05.543621
2222222222 8833333333 2013-06-20-11.30.05.543621
1111111111 8933333333 2013-06-20-06.30.05.543621
6666666666 8833333333 2013-06-20-06.30.05.543621


I am using DFSORT as below
SORT FIELDS=(1,10,CH,A)
SUM FIELDS=()

Whats to give in () to filter the same time stamp fields. Can Some one help here how to approach this.

Thanks,
sganja
 
Posts: 13
Joined: Wed Feb 06, 2013 8:58 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Comparing TIMESTAMP in Sort

Postby enrico-sorichetti » Thu Jun 11, 2015 1:33 pm

your explanation is clear as mud ...

show what is the expected output data
for the the input data You posted

and use the code tags to keep data aligned
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Comparing TIMESTAMP in Sort

Postby BillyBoyo » Thu Jun 11, 2015 2:00 pm

Do you want to SORT the records? You have duplicate timestamps across keys. Is that OK?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Comparing TIMESTAMP in Sort

Postby sganja » Thu Jun 11, 2015 2:44 pm

Hi All

I want to write the records to separate file which have duplicate timestamps across keys.
Input file:
8888888888 9933333333 2012-02-17-08.12.05.671002
8888888888 8833333333 2012-02-17-08.12.05.671002
9999999999 9933333333 2012-02-18-07.11.08.123456
9999999999 8833333333 2011-01-15-07.11.08.123456
7777777777 9933333333 2012-02-17-00.12.05.671002
7777777777 8833333333 2010-02-17-00.12.05.671002
5555555555 9933333333 2012-02-20-00.12.05.671002
5555555555 8833333333 2012-02-20-00.12.05.671002
4444444444 9933333333 2012-06-20-06.30.05.543621
4444444444 8833333333 2013-11-30-06.30.05.543621
3333333333 8833333333 2011-06-20-06.30.05.543621
2222222222 8833333333 2013-06-20-11.30.05.543621
1111111111 8933333333 2013-06-20-06.30.05.543621
6666666666 8833333333 2013-06-20-06.30.05.543621


Expected output:
8888888888 9933333333 2012-02-17-08.12.05.671002
8888888888 8833333333 2012-02-17-08.12.05.671002
5555555555 9933333333 2012-02-20-00.12.05.671002
5555555555 8833333333 2012-02-20-00.12.05.671002



thanks,
sganja
 
Posts: 13
Joined: Wed Feb 06, 2013 8:58 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Comparing TIMESTAMP in Sort

Postby sganja » Thu Jun 11, 2015 5:38 pm

I am able to complete it. Thank you all for your time spent.
sganja
 
Posts: 13
Joined: Wed Feb 06, 2013 8:58 pm
Has thanked: 1 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post