Edit XSUM file



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

Edit XSUM file

Postby Raja190 » Thu Dec 15, 2016 3:20 pm

Hi,

i need to remove duplicates from a file and write duplicate records in to another file. i know this can be done through (sum fields=none,xsum) , but i want to make a small change in the duplicate record (edit duplicate) and write it to SORtXSUM file

input file:
A123456789
A123456789
A987654321

output file:
A123456789
A987654321


The duplicate from input file will be written to SORTXSUM file and just need to change the first byte from 'A' to 'B'.
SORTXSUM File:
B123456789
Raja190
 
Posts: 36
Joined: Mon Dec 14, 2015 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Edit XSUM file

Postby BillyBoyo » Thu Dec 15, 2016 3:42 pm

You sample data is in key order. Why SORT it?

What does your documentation about about using OUTFIL with SORTXSUM?

If you can't do that, then no, you can't get at records which are only on that file other than by reading it once it is finished with (another step (or ICETOOL operator).

In place of XSUM, you could extend the records with a sequence number with RESTART= for the key, and have two OUTFILs, one to process all records with sequence equal to one, the other to process everything else, using SAVE. In the second OUTFIL make your change as you BUILD to drop off the sequence number. In the first OUTFIL, just BUILD to drop off the sequence number.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post