Page 1 of 1

Need help is sort xsum

PostPosted: Fri Jun 27, 2014 11:35 am
by rajaranganathan
Hi All,

I need your help/suggestion in specifying outrec for a xsum file.

I have an input file that contains duplicate records and i need to write the unique records in to the output file and duplicate records in to an another file.
I knew this can be done through "sum fields=none, xsum' but the problem here is the output file has "outrec fields" specific and my "sortxsum" file also writes in the same format which i don't want and i want have my "sortxsum" file speified with another set of columns from the input"

Also this can be done through 2 steps but i would like to complete it in one step. As a conclusion i want different "outrec fields" specified for my sortxsum files.

Please help/suggest me with this. Thanks in advance :)


Thanks & Regards
Raja.R

Re: Need help is sort xsum

PostPosted: Fri Jun 27, 2014 12:00 pm
by BillyBoyo
I'm fairly sure it can't be done with XSUM, as the deleted records are written to SORTXSUM immediately, they are no available for further processing.

The trick would be to use ICETOOL's SELECT operator, with TO and DISCARD, both the TO and DISCARD datasets can be processed by OUTFIL (specifying the individual correct names to two OUTFIL statements). As a SyncSort site, you probably have SyncTool aliased to ICETOOL, but no documentation.

If you search the web there is a Smart DFSORT Trick which shows out to do XSUM (without the OUTFIL) and you'll need to add a USING and your two OUTFIL statements.

Re: Need help is sort xsum

PostPosted: Thu Jul 03, 2014 4:58 pm
by rajaranganathan
Hi Billy,

Thanks for your suggestion and details explanation.

Sorry that I misunderstood that code , actually it works as we expect. That's in Sortxsum all the columns of the record is copying and the out rec is applied only for the sort out file. Now it works fine.

This helped me to understand something here. :)


Thanks All.