I have a query. I want to know if this can be achieved by using JCL or a COBOL program is required. If JCL or COBOL, then what is the way to achieve it? I m trying to do via COBOL program. Its seems to be getting more complex than required.
Please find the more details below:
INput file ---->
1st column is id, 2nd column is type, 3rd column is record type, 4th column is value, 5th column is name
Output criteria:
1. no change in header record, should be copied as it is
2. Total for value should be done only when type is '1' and record type is '2'(detail record)
3. Different total should be done for each 'id'
(a) within each 'id', different total for each "name"
3. rest all records other than type '1' should be written as it is