I need some guidance on a small report.
I have an input file which contains around 2 million records. File is about 115 in record length.
I am sorting by 2 fields 1 byte each.
I am summing up by a third field, and need to count the records by sort by fields, keeping subtotals by the inner field and totals by the outer by field.
My issue is that,
1) Count is giving always 1 as result, and is wrong
2) Is adding an extra record to put the count result.
how can I solve this?
I am assuming that the trailer3 I am using is wrong.
Or maybe is when it executes first the sum deletes the duplicate records and by the time it gets to count them is only 1 of them.
How can I force the count result to the end of the same record?
I tried using OUTREC, but how can I specify the name of the count field?
Here is my code
085,003, H CODE
096,008, ENTITIES #