gotobaskar
New User
Joined: 08 Jul 2012 Posts: 1 Location: India
|
|
|
|
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
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
Brief description of the output file below,
AB0;DILIP;ENGINEER;CONSULTANT
In the above record, forth field value picked from the last record( key field has 111)
ABA;KUMAR;DEVELOPER;CONSULTANT;10000
ABA;KUMAR;DEVELOPER;CONSULTANT;15000
The above two 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 |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Unfortunately you have found the "wrong forum". We have a separate forum for beginners (freshers) and students.
You need to register for that forum and post your question there.
Use [URL] BBCode for External Links
Also when posting to that forum, explain what tool/language your are supposed to use to accomplish what you want. You also need to much more clearly explain the "rules" for getting from the input to the output you want. |
|