Author: amar143
Subject: Addition of two records on 2 fields
Posted: Tue Oct 03, 2017 11:14 am (GMT 5.5)
Hi,
My input file have records as shown below:
I want to add count and price for same SRNO and CDE.
SRNO -- length 6 bytes
CDE -- lenght 2 bytes
COUNT -- length 1 byte
PRICE -- length 4 bytes
Input file:
SRNO CDE COUNT PRICE
100001 10 2 1000
100001 10 2 1000
100001 20 4 3000
100001 20 2 1000
100002 20 2 5000
100002 20 2 1000
Output should be
100001 10 4 2000
100001 20 6 4000
100002 10 4 6000
can we achieve above addition of fields through JCL?
Thanks in advance for yor help!!
Subject: Addition of two records on 2 fields
Posted: Tue Oct 03, 2017 11:14 am (GMT 5.5)
Hi,
My input file have records as shown below:
I want to add count and price for same SRNO and CDE.
SRNO -- length 6 bytes
CDE -- lenght 2 bytes
COUNT -- length 1 byte
PRICE -- length 4 bytes
Input file:
SRNO CDE COUNT PRICE
100001 10 2 1000
100001 10 2 1000
100001 20 4 3000
100001 20 2 1000
100002 20 2 5000
100002 20 2 1000
Output should be
100001 10 4 2000
100001 20 6 4000
100002 10 4 6000
can we achieve above addition of fields through JCL?
Thanks in advance for yor help!!