Hi,
I have a requirement where i need to match data across four files for the first two fields and write matching data into an output file. The file1 is master file and having duplicate records where as the other three file will have single record for the same key combination. I need to write an output will all duplicate records from the first file with the data from the other three files as shown below. I tried SPLICE function with WITHALL option. It did not work out. Could any one please suggest me..
File 1
name length start end
field1 8 1 8
field2 8 9 16
field3 5 17 21
field4 20 22 41
field5 5 42 46
field6 12 47 58
----+----1----+----2----+----3----+----4----+----5----+---
***************************** Top of Data ****************
0501082612893 1021 40477332363003 1 1049
0501082612893 1021 40477332363011 3 0
0501082612893 1021 4543120131583538 8 0
0501082612893 1021 12 0
0501082612893 1026 3 41037
0501082612893 1035 1 1738
0501082612893 1035 3 1
0501082612893 1048 1 1037
0501082612893 1048 3 25000
0489458212903 1021 40477361641204 1 412
0489458212903 1021 40477391690809 2 0
0489458212903 1021 40477332650177 3 0
0489458212903 1021 12 0
0489458212903 3005 8 -797
0489458212903 9017 2 0
0489458212903 9017 2 0
0489458212903 9017 2 0
File 2
name length start end
field1 8 1 8
field2 8 9 16
field3 8 17 24
field4 1 25 25
field5 1 26 26
field6 8 27 34
----+----1----+----2----+----3----
0183177212892 200404260020050615
0501082612893 200404260020070831
0489458212903 200404260020070831
File 3
name length start end
field1 8 1 8
field2 8 9 16
field3 8 17 24
----+----1----+----2----
0044402712889 20090314
0501082612893 20090508
0304833412902 20090524
0489458212903 20071227
File 4
name length start end
field1 8 1 8
field2 8 9 16
field3 1 17 17
----+----1----+----2----+
0183177212892 A20070829
0501082612893 U20070829
0303768512894 U20070829
0489458212903 U20070829
Output file
name length start end
CUST_ID 8 1 8
EWISE_ID 6 9 14
INST_ID 5 15 19
ACC_TYPE 5 20 24
ACC_NUM 30 25 54
REC_ACDT 8 55 62
BALANCE 12 63 74
MKT_ALL 1 75 75
MKT_WEB 1 76 76
REG_DT 8 77 84
REG_DT 8 85 92
USER_STATUS 1 93 93
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9---
********************************* Top of Data ***********************************************
0501082612893 1021 1 40477332363003 200708311049 002004042620090508U
0501082612893 1021 3 40477332363011 200708310 002004042620090508U
0501082612893 1021 8 4543120131583538 200708310 002004042620090508U
0501082612893 1021 12 200708310 002004042620090508U
0501082612893 1026 3 2007083141037 002004042620090508U
0501082612893 1035 1 200708311738 002004042620090508U
0501082612893 1035 3 200708311 002004042620090508U
0501082612893 1048 1 200708311037 002004042620090508U
0501082612893 1048 3 2007083125000 002004042620090508U
0489458212903 1021 1 40477361641204 20070831412 002004042620071227U
0489458212903 1021 2 40477391690809 200708310 002004042620071227U
0489458212903 1021 3 40477332650177 200708310 002004042620071227U
0489458212903 1021 12 200708310 002004042620071227U
0489458212903 3005 8 20070831-797 002004042620071227U
0489458212903 9017 2 200708310 002004042620071227U
0489458212903 9017 2 200708310 002004042620071227U
0489458212903 9017 2 200708310 002004042620071227U