View previous topic :: View next topic
|
Author |
Message |
pnsnaresh
New User
Joined: 16 May 2006 Posts: 7 Location: pune
|
|
|
|
Hi,
I have 2 sorted files A and B(empid empname). now match record of A with B if matched write AB in C, unmatched write A in to D, Brecords not in A write in E.
input files : A,B
output files: C,D,E
needed program logic
Thanks in advance
Naresh |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Naresh,
Please find logic below
IF Key of FILEA = Key of FILEB
Populate FILEC record using FILEA Record
WRITE FILEC
READ FILEA
READ FILEB
ELSE
IF Key of FILEA < Key of FILEB
Populate FILED Record using FILEA Record
WRITE FILED
READ FILEA
ELSE
Populate FILEE Record using FILEB Record
WRITE FILEE
READ FILEB
END-IF
END-IF.
Hope it will helpful |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
You can do this using SORT ICETOOL.
search the forum in SORT/ICETOOL and you can find the solution. |
|
Back to top |
|
|
|