Author: sergeyken
Posted: Thu Aug 11, 2016 6:05 pm (GMT 5.5)
Two details.
1) The requirements was: "last record needs to have the sum of the values that are represented in those records".
Parameter TRAILER calculates the total number of type-1 records (that is 6 in this example), while it needs to summarize all the field values from type-9 records (that is 000000003+000000001+000000002=000000006).
2) Statement OMIT just eliminates all type-9 records on input; so there is nothing to summarize from type-9 as required.
Posted: Thu Aug 11, 2016 6:05 pm (GMT 5.5)
Abid Hasan wrote: | ||
Hello Kevin, A simple method can be (assuming LRECL=80); tested on DFSORT, should work with SyncSORT too:
|
Two details.
1) The requirements was: "last record needs to have the sum of the values that are represented in those records".
Parameter TRAILER calculates the total number of type-1 records (that is 6 in this example), while it needs to summarize all the field values from type-9 records (that is 000000003+000000001+000000002=000000006).
2) Statement OMIT just eliminates all type-9 records on input; so there is nothing to summarize from type-9 as required.