How to Split the record in two part and remove the duplicate using syncsort?
File 1
01 FILE-REC
05 AREA-NMBR PIC 9(5)
05 BEG-RANGE PIC 9(10)
05 END-RANGE PIC 9(10)
DATA IN FILE 1
0001952000000000100000008
0001952000000001000000020
0001952000000003000000040
0012121000000011100000121
0012121000000015100000191
OUTPUT FILE
0001952000000000100000040
0012121000000011100000191
REQUIREMENT
For a particular area number we have more than one record, out of these records we have to arrange minimum value for BEG-RANGE field and maximum value for END-RANGE in a record.
as per example values of BEG-RANGE for 0001952 AREA-NMBR
0000000001
0000000010
0000000030
out of these we need to get minimum value 0000000001
as per example values of END-RANGE for 0001952 AREA-NMBR
00000008
00000020
00000040
out of these we need to get maximum value 0000000040
and at last we need to put these two values with AREA-NMBR
like 000195200000000010000000040
Likewise we have to do for other records. Area-NMBR is getting repeated but other two fields are unique.
Can anyone help me doing this with the help of synsort 1.3.2 version.