Page 1 of 1

SORT card to sum the Amount fields of identical customer rec

PostPosted: Fri Oct 16, 2009 9:54 am
by akadelhi1
Hi ,
I have a flat file of length 20 bytes.
I have to check for identical records in the position 1 to 8 and 16 to 20 .
If there any identical records then i must sum the amount value which is available in the position 9 to 12(which is the profit field ) and 13 to 16 (which is the loss).
Can any one get a sort card for this

Re: SORT card to sum the Amount fields of identical customer rec

PostPosted: Fri Oct 16, 2009 8:45 pm
by Frank Yaeger
It's difficult to tell what your data really looks like (ZD, PD?) but you can probably use SORT and SUM to do what you want. You can find all of the DFSORT books at:

http://www.ibm.com/support/docview.wss? ... g3T7000080

If you need more specific help, please show an example of the input records (relevant fields only) and what you expect for output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. Please don't attach files (especially in spreadsheet format). Just post the examples here inline using code tags.