I have a requirement in which I have two files(A and B) of Record format- FB and record length- 20. I want all the records from file A and add the count of field which is at position 8-12 of file A to B and need this result in output file C.Below are the screen shot of files.
FILE A:-
BRANCH-ID CONTROLLER-ID BRANCH-COUNT
4/NUM 3/NUM 5/PS
(1-4) (5-7) (8-12)
1---------------- 2-------------------- 3-------------------
********************************* TOP OF DATA **************
0001 110 100
0002 125 200
0005 119 500
0006 104 600
0008 99 800
0009 219 900
4/NUM 3/NUM 5/PS
(1-4) (5-7) (8-12)
1---------------- 2-------------------- 3-------------------
********************************* TOP OF DATA **************
0001 110 100
0002 125 200
0005 119 500
0006 104 600
0008 99 800
0009 219 900
FILE B:-
BRANCH-ID CONTROLLER-ID BRANCH-COUNT
4/NUM 3/NUM 5/PS
(1-4) (5-7) (8-12)
1---------------- 2-------------------- 3-------------------
********************************* TOP OF DATA **************
0001 110 1000
0005 119 5000
0006 104 6000
0009 219 9000
4/NUM 3/NUM 5/PS
(1-4) (5-7) (8-12)
1---------------- 2-------------------- 3-------------------
********************************* TOP OF DATA **************
0001 110 1000
0005 119 5000
0006 104 6000
0009 219 9000
Output file C should be as below:-
BRANCH-ID CONTROLLER-ID BRANCH-COUNT
4/NUM 3/NUM 5/PS
(1-4) (5-7) (8-12)
1---------------- 2-------------------- 3-------------------
********************************* TOP OF DATA **************
0001 110 1100
0002 125 200
0005 119 5500
0006 104 6600
0008 99 800
0009 219 9900
4/NUM 3/NUM 5/PS
(1-4) (5-7) (8-12)
1---------------- 2-------------------- 3-------------------
********************************* TOP OF DATA **************
0001 110 1100
0002 125 200
0005 119 5500
0006 104 6600
0008 99 800
0009 219 9900
Note- There are no duplicates in any of the input file.