I have a record in the input file in the below format
BASIC SALARY = BS
VARIABLE ALLOWNANCE = VA
ID - 3 BYTE, NAME - 10, DESIGNATION - 15, BS - 6, VA - 6
ID NAME DESIGNA BS VA
ABA;KUMAR;DEVELOPER;10000;15000
ABC;MURAL;SUPERVISOR;9000;14000
AB0;DILIP;ENGINEER;6000;12000
AB1;ANAND;ASSISTANT;7000;13000
111;SUDHA;CONSULTANT;12000;20000
OUTPUT FILE SHOULD BE (Have to achieve it through SORT/ICETOOL)
AB0;DILIP;ENGINEER;CONSULTANT
ABA;KUMAR;DEVELOPER;CONSULTANT;10000
ABA;KUMAR;DEVELOPER;CONSULTANT;15000
ABC;MURAL;SUPERVISOR;CONSULTANT;9000
ABC;MURAL;SUPERVISOR;CONSULTANT;14000
AB1;ANAND;ASSISTANT;CONSULTANT;7000
AB1;ANAND;ASSISTANT;CONSULTANT;13000
Scenario / Rules to generat Output : One record in the input file has to be splitted to many and also one field value of the output record has to be picked from other input records..
Brief description of the output file below,
AB0;DILIP;ENGINEER;CONSULTANT ---> First output record
In the above First record, forth field value picked from the last record( key field has 111)
ABA;KUMAR;DEVELOPER;CONSULTANT;10000 --> Second output record
ABA;KUMAR;DEVELOPER;CONSULTANT;15000 --> Third output record
The above second and third records splited from the first record from the input file.
First record of the output file has CONSULTANT from the last record key field has 111 and Basic salary fom input file
Secomd record of the output file has CONSULTANT from the last record key field has 111 and Variable allowance fom input file
Kindly, help me out to get the result.
thanks,
Baski