OUTREC IFOUTLEN=80, <<< preserves the original input file lrecl
IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,6,ZD)), <<< writes as 6 byte seqnum at pos 81 which acts like record counter after sort has eliminated the duplicate records
IFTHEN=(WHEN=(1,1,ZD,EQ,9),OVERLAY=(2:81,6)) <<< if it is trailer record, overlay the record counter value at pos 81 on to pos 2
It adds a 6-byte sequence number after the end of each sorted/summed record ('000001', '000002', etc). The sequence number in the last record (trailer record) will be equal to the count of output records (e.g. if there's a header record, two detail records and a trailer record, the trailer record will have a sequence number of '000004'). The last sequence number = count is overlayed into the trailer ('9') record. IFOUTLEN=80 sets the length of the output records to 80.
thanks for the examples and explanation
all the examples use iceman and icetool
whta possibilities they have
I am working in a bank. We are using the old DFSORT I believe
Tomorrow I will have a look, try out and let you know
Do you mean you want the records eliminated by SUM in a different output file? Or do you mean something else? For your original example, would you just want the other output file to have the second 1KLBB456TY record, or would you want it to have something else? If something else, what?