Extract one instance of record.



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

Extract one instance of record.

Postby Mehdi shri » Tue Oct 16, 2012 11:03 am

Dear friend
I want a methode to extract one instance of records which contain same data on coloumn 11 to 15. For example if SORTIN like below:
ABCDE1000077001
BACDE1000077001
CBADE1000077001
DCBAE1000077002
EDCBA1000077002
ABCDE1000077003

Out put must be below:
ABCDE1000077001
DCBAE1000077002
ABCDE1000077003
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Extract one instance of record.

 

Re: Extract one instance of record.

Postby NicC » Tue Oct 16, 2012 11:50 am

How about using
SUM FIELDS=NONE
?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2751
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 110 times

Re: Extract one instance of record.

Postby BillyBoyo » Tue Oct 16, 2012 11:51 am

  MERGE FIELDS=(11,5,CH,A)
  SUM FIELDS=(NONE)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Extract one instance of record.

Postby BillyBoyo » Wed Oct 17, 2012 4:16 am

A clarification:

You can use SUM with MERGE. You can use MERGE with one file. Therefore, if a file is in sequence already, MERGE with SUM will use less resources than SORT with SUM.

It is one of those things. "We" know that a file is in sequence before the step is run. SORT only knows when it has already read the last record, at the earliest.

If the file is not in sequence, MERGE will tell you, and you'll have to use SORT anyway.

You cannot use SUM with SORT FIELDS=COPY/OPTION COPY. You can specify it, but it won't do anything.

For the MERGE you will need to change SORTIN to SORTIN01. If you were merging, say, four files, they would be SORTIN01, ...02, ...03, ...04.

These users thanked the author BillyBoyo for the post (total 2):
sureshas12 (Tue Nov 06, 2012 3:10 pm) • Mehdi shri (Wed Oct 17, 2012 10:19 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post