My requirement is, I have two files (A & B) and for all the records in File A, I need to check with File B (match with Pol Num) and based on Int Company of File B, I need to split the file A into File A and File C.
Input Files:
----------------------
File A
Pol Num Name Pol Date Company
5 10 8 1
12345 aaaaa 01142007 8
46457 bbbbb 01012008 8
89789 gdfdfg 10312006 8
55555 gfgdgfd 12302007 8
66666 trgfgh 01012007 8
File B
Pol Num Int Company
12345 1
46457 6
89789 1
55555 1
66666 6
Output Files :
------------------------
File A
Pol Num Name Pol Date Company
5 10 8 1
12345 aaaaa 01142007 8
89789 gdfdfg 10312006 8
55555 gfgdgfd 12302007 8
File C
Pol Num Name Pol Date Company
5 10 8 1
46457 bbbbb 01012008 8
66666 trgfgh 01012007 8
Can anyone tell , whether I can do this with ICETOOL and SPLICE.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
What is the RECFM and LRECL of input file1? What is the RECFM and LRECL of input file2?
What is the starting position, length and format of each field in input file1?
What is the starting position, length and format of each field in input file2?
Does every policy number in input file1 appear in input file2 as in your example? Does input file1 have no duplicates within it as in your example? Does input file2 have no duplicates within it as in your example? If not, show a better example with all of the possible variations.
Do you need the output records in their original order by policy number or can they be in order by policy number?
Every Policy Number in File A will be there in File B. File A and File B can contain duplicate rows(I just gave few fields in file B as the original file is of 3000 bytes, assuming that I can play around), but corresponding companies will be same for that policy number i.e for every pol-no in File A will have only one int-company in File B.
Output files can be of any order.
Attached is an example. Hope this example is a better one.