Need the last entry while using XSUM in SYNCSORT JCL
I have some data like below:
This is not the actual data, but actual data is similar to this.
Name Number code
+++++++++++++++
Albert 122234 xcc
Robert 565435 rtd
Robert 776567 iuy
Robert 452890 yyt
Stuart 776565 ter
I need to eliminate the duplicates using SYNCSORT. Now I can do this using
XSUM, but I would get the following data:
Name Number code
+++++++++++++++
Albert 122234 xcc
Robert 565435 rtd
Stuart 776565 ter
But I need:
Name Number code
+++++++++++++++
Albert 122234 xcc
Robert 452890 yyt
Stuart 776565 ter
The last set of data has the last occurance of 'Robert' in the output,
while the former set has the first occurance.
So, is there any way to achieve this using XSUM...?
No comments:
Post a Comment